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

Add Good Job support #116

Merged
merged 16 commits into from Feb 8, 2023
Merged

Add Good Job support #116

merged 16 commits into from Feb 8, 2023

Conversation

adamlogic
Copy link
Collaborator

No description provided.


if track_busy_jobs?
busy_count_by_queue = run_silently do
::GoodJob::Execution.running.group(:queue_name).count
Copy link
Collaborator Author

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?

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 🙌🏻

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adamlogic adamlogic changed the title [WIP] Add Good Job support Add Good Job support Feb 7, 2023
@adamlogic adamlogic merged commit 97de556 into main Feb 8, 2023
@adamlogic adamlogic deleted the good-job branch February 8, 2023 12:57
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.

None yet

2 participants