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 Good Job support #116
Add Good Job support #116
Conversation
|
||
if track_busy_jobs? | ||
busy_count_by_queue = run_silently do | ||
::GoodJob::Execution.running.group(:queue_name).count |
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.
@bensheldon One of Judoscale's features is tracking "busy jobs" so users can optionally suppress downscaling when jobs are actively running. This avoids terminating long-running jobs that can't be cleanly restarted. (Not an ideal situation, but one in which a lot of teams find themselves.)
Does the query above look correct to you for obtaining a count of actively running jobs grouped by queue?
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.
Yep, that query looks good. GoodJob::Execution.running
will be incorrect if the process is SIGKILLed because it doesn't look at Advisory Locks, though that also makes it a much lighter-weight query. I think it's appropriate.
(The alternative would be GoodJob::Job.running
)
Sorry for the slow reply on this. Happy to see it merged 🙌🏻
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.
Thanks!
No description provided.