Skip to content

Commit 001cb3e

Browse files
committed
fix: use queue:listen in local environment for QueueWorker
1 parent 9d1fc92 commit 001cb3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/QueueWorker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ public function up(string|QueueConfig $config): void
2424
throw new \InvalidArgumentException("Invalid queue configuration alias [$config]");
2525
}
2626

27+
$command = app()->isLocal()
28+
? 'queue:listen'
29+
: 'queue:work';
30+
2731
$this->childProcess->artisan(
2832
[
29-
'queue:work',
33+
$command,
3034
"--name={$config->alias}",
3135
'--queue='.implode(',', $config->queuesToConsume),
3236
"--memory={$config->memoryLimit}",

0 commit comments

Comments
 (0)