Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR Add message to inform user that the task can be run again #8745

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/Dev/Tasks/MigrateFileTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class MigrateFileTask extends BuildTask

protected $title = 'Migrate File dataobjects from 3.x';

protected $description
= 'Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0';
protected $description =
'Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0. ' .
'If the task fails or times out, run it again and it will start where it left off.';

public function run($request)
{
Expand All @@ -27,6 +28,11 @@ public function run($request)
return;
}

DB::alteration_message(
'If the task fails or times out, run it again and it will start where it left off.',
"info"
);

$migrated = FileMigrationHelper::singleton()->run();
if ($migrated) {
DB::alteration_message("{$migrated} File DataObjects upgraded", "changed");
Expand All @@ -38,7 +44,6 @@ public function run($request)
DB::alteration_message("No image thumbnail helper detected", "notice");
return;
}

ImageThumbnailHelper::singleton()->run();
}
}