mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 21:29:23 +02:00
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:
commit
7ee0dff391
@ -17,8 +17,9 @@ class MigrateFileTask extends BuildTask
|
|||||||
|
|
||||||
protected $title = 'Migrate File dataobjects from 3.x';
|
protected $title = 'Migrate File dataobjects from 3.x';
|
||||||
|
|
||||||
protected $description
|
protected $description =
|
||||||
= 'Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0';
|
'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)
|
public function run($request)
|
||||||
{
|
{
|
||||||
@ -27,6 +28,11 @@ class MigrateFileTask extends BuildTask
|
|||||||
return;
|
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();
|
$migrated = FileMigrationHelper::singleton()->run();
|
||||||
if ($migrated) {
|
if ($migrated) {
|
||||||
DB::alteration_message("{$migrated} File DataObjects upgraded", "changed");
|
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");
|
DB::alteration_message("No image thumbnail helper detected", "notice");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageThumbnailHelper::singleton()->run();
|
ImageThumbnailHelper::singleton()->run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user