MINOR Add message to inform user that the task can be run again without issue

This commit is contained in:
Maxime Rainville 2019-01-23 18:40:15 +13:00
parent 4a51412c39
commit 39297b8640

View File

@ -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)
{
@ -27,6 +28,11 @@ class MigrateFileTask extends BuildTask
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");
@ -38,7 +44,6 @@ class MigrateFileTask extends BuildTask
DB::alteration_message("No image thumbnail helper detected", "notice");
return;
}
ImageThumbnailHelper::singleton()->run();
}
}