Skip to content

Commit 9cde662

Browse files
committed
enqueuer channels
1 parent 561942f commit 9cde662

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/Core/Queue/Command/QueueWorkerCommand.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function configure(Command $command): void
161161
$command->addOption(
162162
'enqueuer',
163163
'e',
164-
InputOption::VALUE_NONE,
164+
InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
165165
'Also run the enqueuer service in the worker.',
166166
);
167167

@@ -211,7 +211,11 @@ public function execute(IOInterface $io): int
211211
);
212212

213213
// Enqueuer
214-
if ($io->getOption('enqueuer')) {
214+
$enqueuerChannels = $io->getOption('enqueuer');
215+
216+
if (count($enqueuerChannels) > 0) {
217+
$enqueuerChannels = array_filter($enqueuerChannels) ?: null;
218+
215219
$io->style()->warning(
216220
[
217221
'Running Enqueuer with queue worker.',
@@ -227,6 +231,7 @@ public function execute(IOInterface $io): int
227231
$this->prepareDebugServices($io, $enqueuer);
228232

229233
$worker->enqueuer = $enqueuer;
234+
$worker->enqueuerChannels = $enqueuerChannels;
230235

231236
$this->runEnqueuerConfigScripts(
232237
'init_scripts',

0 commit comments

Comments
 (0)