Skip to content

Commit

Permalink
ignore max attempts if retryUntil is set (#35214)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid authored Nov 13, 2020
1 parent 72d6f88 commit 56f79e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ protected function markJobAsFailedIfWillExceedMaxAttempts($connectionName, $job,
$this->failJob($job, $e);
}

if ($maxTries > 0 && $job->attempts() >= $maxTries) {
if (! $job->retryUntil() && $maxTries > 0 && $job->attempts() >= $maxTries) {
$this->failJob($job, $e);
}
}
Expand Down

0 comments on commit 56f79e2

Please sign in to comment.