Skip to content

Commit

Permalink
Let the WorkCommand specify whether to stop when queue is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
deleugpn committed Sep 5, 2018
1 parent fad9a16 commit 2524c5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Queue/Console/WorkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class WorkCommand extends Command
{--queue= : The names of the queues to work}
{--daemon : Run the worker in daemon mode (Deprecated)}
{--once : Only process the next job on the queue}
{--all : Work all jobs and stop when queue is empty}
{--delay=0 : The number of seconds to delay failed jobs}
{--force : Force the worker to run even in maintenance mode}
{--memory=128 : The memory limit in megabytes}
Expand Down Expand Up @@ -112,7 +113,8 @@ protected function gatherWorkerOptions()
return new WorkerOptions(
$this->option('delay'), $this->option('memory'),
$this->option('timeout'), $this->option('sleep'),
$this->option('tries'), $this->option('force')
$this->option('tries'), $this->option('force'),
$this->option('all')
);
}

Expand Down

0 comments on commit 2524c5e

Please sign in to comment.