Skip to content

Commit

Permalink
Merge branch 'pr30863' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 2, 2020
2 parents abde7af + a3384ab commit 2811c49
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/Illuminate/Foundation/Bus/PendingChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,21 @@ public function dispatch()
$firstJob = $this->job;
}

$firstJob->allOnConnection($this->connection);
$firstJob->allOnQueue($this->queue);
if ($this->connection) {
$firstJob->chainConnection = $this->connection;
$firstJob->connection = $firstJob->connection ?: $this->connection;
}

if ($this->queue) {
$firstJob->chainQueue = $this->queue;
$firstJob->queue = $firstJob->queue ?: $this->queue;
}

if ($this->delay) {
$firstJob->delay = ! is_null($firstJob->delay) ? $firstJob->delay : $this->delay;
}

$firstJob->chain($this->chain);
$firstJob->delay($this->delay);
$firstJob->chainCatchCallbacks = $this->catchCallbacks();

return app(Dispatcher::class)->dispatch($firstJob);
Expand Down

0 comments on commit 2811c49

Please sign in to comment.