mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Enable file hash caching when running the file migration task (#8993)
This commit is contained in:
parent
5b6d0946f4
commit
4f39e59aff
@ -7,8 +7,9 @@ use Monolog\Logger;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use SilverStripe\AssetAdmin\Helper\ImageThumbnailHelper;
|
||||
use SilverStripe\Assets\Dev\Tasks\LegacyThumbnailMigrationHelper;
|
||||
use SilverStripe\Assets\FileMigrationHelper;
|
||||
use SilverStripe\Assets\Dev\Tasks\FileMigrationHelper;
|
||||
use SilverStripe\Assets\Storage\AssetStore;
|
||||
use SilverStripe\Assets\Storage\FileHashingService;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Logging\PreformattedEchoHandler;
|
||||
@ -46,6 +47,8 @@ class MigrateFileTask extends BuildTask
|
||||
$args = $request->getVars();
|
||||
$this->validateArgs($args);
|
||||
|
||||
Injector::inst()->get(FileHashingService::class)->enableCache();
|
||||
|
||||
$this->extend('preFileMigration');
|
||||
|
||||
$subtasks = !empty($args['only']) ? explode(',', $args['only']) : $this->defaultSubtasks;
|
||||
|
Loading…
Reference in New Issue
Block a user