Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mekasudheer
Copy link
Contributor

@mekasudheer mekasudheer commented Jul 14, 2022

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.

@@ -21,6 +21,9 @@ def throttled?(job, *args)

job.logger.debug { "Throttle: #{method_name} has been exceeded." }
true
rescue Exception => e

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

Copy link
Contributor Author

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

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?

@mekasudheer mekasudheer changed the title CON-922 Exception raises in throttle check Exception raises in throttle check Jul 15, 2022
@reidmorrison
Copy link
Owner

How did running this work out in production, has it resolved the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants