-
Notifications
You must be signed in to change notification settings - Fork 2
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 jobs being retried forever #15
Conversation
Nice catch, thanks for this! As regards the flaky test, if I'm reading the code correctly (such that it's failing because the retry attempt comes so quickly that the check for the job delay doesn't pass?) you could make it reliable by |
The reason the SQLite test was so “flakey” was because jobs with a I also created a PR to change the behaviour for setting |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=======================================
Coverage 98.18% 98.18%
=======================================
Files 7 7
Lines 275 275
=======================================
Hits 270 270
Misses 5 5
|
Holding off on merging temporarily until we get the release automation working (won't take long). |
Currently, if a job is dispatched with a non-zero maxRetryCount, the job is retried forever. This is because the
JobData
was initialised with the default value (0) forattempts
.I’ve added a test for this, however it is currently flakey (especially when run with SQLite) since
delayUntil
is set for retried jobs, even if the retry delay is zero. This can be fixed by changing the behaviour in the queues package to set a nildelayUntil
when the retry delay is zero, but I’m not sure if this is the best solution.