Skip to content

Commit 613f5fb

Browse files
committed
Remove emulated area
1 parent 91486f7 commit 613f5fb

File tree

1 file changed

+5
-14
lines changed
  • app/code/Magento/MediaGallerySynchronization/Console/Command

1 file changed

+5
-14
lines changed

app/code/Magento/MediaGallerySynchronization/Console/Command/Synchronize.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
namespace Magento\MediaGallerySynchronization\Console\Command;
99

10-
use Magento\Framework\App\Area;
11-
use Magento\Framework\App\State;
1210
use Magento\Framework\Console\Cli;
1311
use Magento\MediaGallerySynchronizationApi\Api\SynchronizeInterface;
1412
use Symfony\Component\Console\Command\Command;
@@ -25,21 +23,13 @@ class Synchronize extends Command
2523
*/
2624
private $synchronizeAssets;
2725

28-
/**
29-
* @var State $state
30-
*/
31-
private $state;
32-
3326
/**
3427
* @param SynchronizeInterface $synchronizeAssets
35-
* @param State $state
3628
*/
3729
public function __construct(
38-
SynchronizeInterface $synchronizeAssets,
39-
State $state
30+
SynchronizeInterface $synchronizeAssets
4031
) {
4132
$this->synchronizeAssets = $synchronizeAssets;
42-
$this->state = $state;
4333
parent::__construct();
4434
}
4535

@@ -60,10 +50,11 @@ protected function configure()
6050
protected function execute(InputInterface $input, OutputInterface $output)
6151
{
6252
$output->writeln('Synchronizing assets information from media storage to database...');
63-
$this->state->emulateAreaCode(Area::AREA_ADMINHTML, function () {
64-
$this->synchronizeAssets->execute();
65-
});
53+
54+
$this->synchronizeAssets->execute();
55+
6656
$output->writeln('Completed assets synchronization.');
57+
6758
return Cli::RETURN_SUCCESS;
6859
}
6960
}

0 commit comments

Comments
 (0)