-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Create InterruptErrors
extension to raise an exception when an interrupted job is retried
#830
Conversation
…rrupted job is retried
@TAGraves for your review. fyi, @jrochkind too because this is sort of related to #794 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 This is going to be a huge help for us!
Thanks for the tag. I don't entirely understand what's going on, but seems good...
Wait... is that a NEW feature? I thought that was always a feature of good_job from the start? No? |
@jrochkind whoops, "will be" is just poor language on my part. It's "Jobs are automatically retried" which is how it's always been. #794 would log interrupted jobs that had been forcibly shutdown. This PR will, when those jobs are retried, provide some control over how they are executed (e.g. discard them rather than retry). |
Thanks! Sounds good! |
around_perform do |_job, block| | ||
raise InterruptError, "Interrupted after starting perform at '#{CurrentThread.execution_interrupted}'" if CurrentThread.execution_interrupted.present? | ||
|
||
block.call | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this override/be overridden by any around_perform
i have in my application_job.rb?
Connects to #821