File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 6
6
'port ' => env ('ELASTICSEARCH_PORT ' , '9200 ' ),
7
7
],
8
8
'indices ' => [],
9
+ 'queue ' => env ('ELASTICSEARCH_QUEUE ' , config ('queue.default ' )),
9
10
];
Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ public function handle()
55
55
56
56
$ this ->info (sprintf ('Indexing %s ' , $ indexConfig ->getName ()));
57
57
58
- dispatch (new SetupIndex ($ indexConfig , (bool ) $ this ->option ('delete ' )));
59
-
60
58
Bus::batch ([
61
- [new PopulateIndex ($ indexConfig )],
62
- ])
59
+ [new SetupIndex ($ indexConfig , (bool ) $ this ->option ('delete ' ))],
60
+ [new PopulateIndex ($ indexConfig )],
61
+ ])
62
+ ->onQueue (config ('elastica-bridge.queue ' ))
63
63
->then (function () use ($ indexConfig ): void {
64
- dispatch (new ActivateIndex ($ indexConfig ));
64
+ ActivateIndex::dispatch ($ indexConfig )
65
+ ->onQueue (config ('elastica-bridge.queue ' ));
65
66
})
66
67
->name ('ES index: ' .$ indexConfig ->getName ())
67
68
->dispatch ();
You can’t perform that action at this time.
0 commit comments