-
Notifications
You must be signed in to change notification settings - Fork 22
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
Exception raises in throttle check #32
base: master
Are you sure you want to change the base?
Conversation
@@ -21,6 +21,9 @@ def throttled?(job, *args) | |||
|
|||
job.logger.debug { "Throttle: #{method_name} has been exceeded." } | |||
true | |||
rescue Exception => e |
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.
should this be StandardError. or does RocketJob raise top level Exception, Reid should probably answer this
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.
I am doing this as MySQL connection errors do not come under Standard Errors.
@@ -1,3 +1,3 @@ | |||
module RocketJob | |||
VERSION = "6.1.0".freeze |
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 changes functionality, i would raise version to 6.2, Reid what do you think?
How did running this work out in production, has it resolved the problem? |
Exception in throttles
If exception raises in throttle checks its adding error logs but not nullifying worker names for Jobs and Slices, due to this reason jobs are becoming jombie jobs.
If exception raises log error and return true which will eventually updates slice and jobs worker names and reque the jobs/slices.
Requeue jobs before removing worker from pool
Every few seconds we run prune to delete dead workers from pool but jobs are still on that worker name. If we requeue jobs
everytime before removing workers from pool, jobs will be queued immediately instead of waiting till server goes down.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.