From 99f3c60b36458e2180316dd4e81c239d862f80b0 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Fri, 13 Nov 2020 12:33:15 +0200 Subject: [PATCH] ignore max attempts if retryUntil is set --- src/Illuminate/Queue/Worker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Worker.php b/src/Illuminate/Queue/Worker.php index 677b4ba9c346..f2ba7b1a01ad 100644 --- a/src/Illuminate/Queue/Worker.php +++ b/src/Illuminate/Queue/Worker.php @@ -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); } }