Skip to content

Commit 1cbc278

Browse files
committed
Fix condition for non retryable jobs
1 parent 14bfe70 commit 1cbc278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ protected function handleMessage($id, $message, $ttr, $attempt)
230230
if ($attempt > 1) {
231231
if ($job instanceof RetryableJobInterface && !$job->canRetry($attempt - 1, $error)) {
232232
return true;
233-
} elseif ($attempt > $this->attempts) {
233+
} elseif (!($job instanceof RetryableJobInterface) && $attempt > $this->attempts) {
234234
return true;
235235
}
236236
}

0 commit comments

Comments
 (0)