-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 handling completed job with expired result when work horse dies #2154
base: master
Are you sure you want to change the base?
Conversation
17d8e7c
to
4a344b0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2154 +/- ##
==========================================
- Coverage 93.61% 93.46% -0.16%
==========================================
Files 28 30 +2
Lines 3760 4114 +354
==========================================
+ Hits 3520 3845 +325
- Misses 240 269 +29 ☔ View full report in Codecov by Sentry. |
Here's the scenario as I understood it:
|
Mind adding a test for this? |
4a344b0
to
0975c00
Compare
@selwin After looking at it again, I was able to add a test demonstrating the issue. |
0975c00
to
1c7b3da
Compare
@fancyweb do you mind checking why the tests failed on Python 3.9? |
1c7b3da
to
5e6baa9
Compare
5e6baa9
to
b82912d
Compare
Since #2039,
Job.get_status()
doesn't returnNone
but raisesInvalidJobOperation
whenrefresh=True
.This change was not handled properly in
Worker.monitor_work_horse()
.I stumbled upon this with a use-case where a job with
result_ttl=0
succeeds but the work horse doesn't exit with0
(because it's wrapped).Job.get_status()
ends up being called and raises an uncaught error.There's no existing test for the behavior and I wasn't able to produce one.