-
-
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
Add job.fail #1484
base: master
Are you sure you want to change the base?
Add job.fail #1484
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1484 +/- ##
==========================================
- Coverage 95.14% 95.09% -0.06%
==========================================
Files 45 45
Lines 6246 6338 +92
==========================================
+ Hits 5943 6027 +84
- Misses 303 311 +8
Continue to review full report at Codecov.
|
I don't think I can add some more tests increase the coverage. |
@rpkak please see my comment here. Do you think this PR is still relevant? |
Yes, I think in special cases of a job failture the customizability of the function will usefull. |
Resolved merge conflicts
Added method
job.fail
to fail the job using a method.job.fail
takes some args to change the failture behavior. Not specifying anything affects the same as raising an exception, apart from printing the traceback which is disabled by default injob.fail
.For review: Please tell me if I should change
exc_info
toorig_exc_info
in some places inrq/rq/worker.py
Lines 1045 to 1051 in 2ee3416
Closes #1313
View: #1313 (comment)