Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 25, 2022
1 parent 1ec9648 commit 82fde9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Illuminate/Queue/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class ListenCommand extends Command
{--memory=128 : The memory limit in megabytes}
{--queue= : The queue to listen on}
{--sleep=3 : Number of seconds to sleep when no job is available}
{--rest=0 : Number of seconds to rest between jobs}
{--timeout=60 : The number of seconds a child process can run}
{--tries=1 : Number of times to attempt a job before logging it failed}
{--rest=0 : Number of seconds to rest between jobs}';
{--tries=1 : Number of times to attempt a job before logging it failed}';

/**
* The name of the console command.
Expand Down Expand Up @@ -114,15 +114,15 @@ protected function gatherOptions()
: $this->option('delay');

return new ListenerOptions(
$this->option('name'),
$this->option('env'),
$backoff,
$this->option('memory'),
$this->option('timeout'),
$this->option('sleep'),
$this->option('tries'),
$this->option('force'),
$this->option('rest')
name: $this->option('name'),
environment: $this->option('env'),
backoff: $backoff,
memory: $this->option('memory'),
timeout: $this->option('timeout'),
sleep: $this->option('sleep'),
rest: $this->option('rest'),
maxTries: $this->option('tries'),
force: $this->option('force')
);
}

Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Queue/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function listen($connection, $queue, ListenerOptions $options)

while (true) {
$this->runProcess($process, $options->memory);

if ($options->rest) {
sleep($options->rest);
}
Expand Down

0 comments on commit 82fde9e

Please sign in to comment.