Skip to content

Commit 14bfe70

Browse files
committed
Added to CHANGELOG
1 parent 18e342f commit 14bfe70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Yii2 Queue Extension Change Log
55
-----------------------
66
- Enh #516: Ensure Redis driver messages are consumed at least once (soul11201)
77
- Bug #522: Fix SQS driver type error with custom value passed to `queue/listen` (flaviovs)
8-
8+
- Bug #528: Prevent multiple execution of aborted jobs
99

1010
2.3.7 April 29, 2024
1111
--------------------

src/Queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected function handleMessage($id, $message, $ttr, $attempt)
228228

229229
// Handle aborted jobs without thrown error
230230
if ($attempt > 1) {
231-
if ($job instanceof RetryableJobInterface && !$job->canRetry($attempt, $error)) {
231+
if ($job instanceof RetryableJobInterface && !$job->canRetry($attempt - 1, $error)) {
232232
return true;
233233
} elseif ($attempt > $this->attempts) {
234234
return true;

0 commit comments

Comments
 (0)