Repository navigation
Reset retry counters on queue:retry - #19
Merged
Merged
Conversation
A retried job kept its old exceptions count and its old retryUntil. So it failed at its first error, or got only one try. Now queue:retry resets the tries and the exceptions count. It also reads retryUntil again from the job class, like a new dispatch.
Contributor
Author
Bot reviewVerdict: OK. Nothing blocking. BlockingNone. Checked
Non-blocking
Checks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
queue:retryput a failed job back with its oldexceptionscount and its oldretryUntiltime (from #18).Effect
maxExceptions: 3that already had 3 errors failed again at its first error.retryUntiltime got only one try.Fix
A retried job now starts fresh, like a new dispatch:
exceptionscount go back to 0.retryUntilis read again from the job class. At dispatch it also comes from the job class (job.retryUntil), so the job gets a new time window. Laravel does the same in its retry command.retryUntilare not decoded on retry. Nothing changes for them.retryUntilis left empty. The worker then fails the job with the real error.The change is in
JobPayload.retried(). Both drivers (database and Redis) use it.Tests
maxExceptionsagain, and a retried job gets a newretryUntilwindow.dart analyze --fatal-infosanddart formatare clean.