Merge pull request #8745 from open-sausages/pulls/4/add-extra-message-to-MigrateFileTask

MINOR Add message to inform user that the task can be run again
This commit is contained in:
Guy Marriott 2019-01-28 09:24:00 +13:00 committed by GitHub
commit 7ee0dff391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
}
}