Skip to content

Commit d8fdfc1

Browse files
authored
When a job fails it tries to reject it twice. (vyuldashev#322)
1 parent 4f06d8e commit d8fdfc1

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Consumer.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -153,23 +153,6 @@ protected function daemonShouldRun(WorkerOptions $options, $connectionName, $que
153153
return ! ((($this->isDownForMaintenance)() && ! $options->force) || $this->paused);
154154
}
155155

156-
/**
157-
* Mark the given job as failed if it has exceeded the maximum allowed attempts.
158-
*
159-
* @param string $connectionName
160-
* @param Job|RabbitMQJob $job
161-
* @param int $maxTries
162-
* @param Exception $e
163-
*/
164-
protected function markJobAsFailedIfWillExceedMaxAttempts($connectionName, $job, $maxTries, $e): void
165-
{
166-
parent::markJobAsFailedIfWillExceedMaxAttempts($connectionName, $job, $maxTries, $e);
167-
168-
if (! $job->isDeletedOrReleased()) {
169-
$job->getRabbitMQ()->reject($job);
170-
}
171-
}
172-
173156
/**
174157
* Stop listening and bail out of the script.
175158
*

0 commit comments

Comments
 (0)