File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
app/code/Magento/MediaGallerySynchronization/Console/Command Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \MediaGallerySynchronization \Console \Command ;
9
9
10
- use Magento \Framework \App \Area ;
11
- use Magento \Framework \App \State ;
12
10
use Magento \Framework \Console \Cli ;
13
11
use Magento \MediaGallerySynchronizationApi \Api \SynchronizeInterface ;
14
12
use Symfony \Component \Console \Command \Command ;
@@ -25,21 +23,13 @@ class Synchronize extends Command
25
23
*/
26
24
private $ synchronizeAssets ;
27
25
28
- /**
29
- * @var State $state
30
- */
31
- private $ state ;
32
-
33
26
/**
34
27
* @param SynchronizeInterface $synchronizeAssets
35
- * @param State $state
36
28
*/
37
29
public function __construct (
38
- SynchronizeInterface $ synchronizeAssets ,
39
- State $ state
30
+ SynchronizeInterface $ synchronizeAssets
40
31
) {
41
32
$ this ->synchronizeAssets = $ synchronizeAssets ;
42
- $ this ->state = $ state ;
43
33
parent ::__construct ();
44
34
}
45
35
@@ -60,10 +50,11 @@ protected function configure()
60
50
protected function execute (InputInterface $ input , OutputInterface $ output )
61
51
{
62
52
$ 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
+
66
56
$ output ->writeln ('Completed assets synchronization. ' );
57
+
67
58
return Cli::RETURN_SUCCESS ;
68
59
}
69
60
}
You can’t perform that action at this time.
0 commit comments