Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consider zero when retry_count not present #7

Conversation

IgorFroehner
Copy link
Contributor

Fix Explanation

We're having some errors in the first failure of jobs with silent active because the job_payload won't have the retry_count key if there were no retries. This is happening because Sidekiq sets the retry_count key on the job_payload to zero only after the first failure of the job: see source. As a side note, observe that the first try doesn't count as a retry in the retry_count, so, the way it's implemented today, the warn_after means warn after # of retries and not # of tries (first try + retry_count) in general.

fix: #6

@IgorFroehner IgorFroehner marked this pull request as draft October 28, 2024 14:58
@IgorFroehner IgorFroehner marked this pull request as ready for review October 28, 2024 15:04
@gustavodiel gustavodiel merged commit ae9f590 into trusted:main Oct 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

First failure is not captured by Silent Retry
2 participants