Skip to content

Commit

Permalink
allow delay as well
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Mar 16, 2017
1 parent deae6c7 commit c6c0c9e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Illuminate/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,13 @@ protected function queueHandler($class, $method, $arguments)

$job->timeout = isset($listener->timeout) ? $listener->timeout : null;

$this->resolveQueue()
->connection($connection)
->pushOn($queue, $job);
$resolvedQueue = $this->resolveQueue()->connection($connection);

if (isset($listener->delay)) {
$resolvedQueue->laterOn($queue, $listener->delay, $job);
} else {
$resolvedQueue->pushOn($queue, $job);
}
}

/**
Expand Down

0 comments on commit c6c0c9e

Please sign in to comment.