Repository navigation
feat: report busy jobs by default - #282
Merged
Merged
Conversation
Refs JDO-1616. `track_busy_jobs` now defaults to true for every job adapter that supports it (all except Shoryuken). Apps can opt out with `config.<adapter>.track_busy_jobs = false` or `JUDOSCALE_LONG_JOBS=false`. Amp-Thread-ID: https://ampcode.com/threads/T-01a1e468-998c-74b8-b0c9-3ec140fd2566 Co-authored-by: Adam McCrea <adam@adamlogic.com>
Busy tracking is on by default now. Point the README only at track_busy_jobs = false for opting out. Refs JDO-1616 Amp-Thread-ID: https://ampcode.com/threads/T-01a1e468-998c-74b8-b0c9-3ec140fd2566 Co-authored-by: Adam McCrea <adam@adamlogic.com>
adamlogic
added a commit
to judoscale/judoscale-python
that referenced
this pull request
Nov 17, 2026
Turns on busy job tracking (`TRACK_BUSY_JOBS`) by default for RQ and Celery, matching the Ruby adapters ([judoscale-ruby#282](judoscale/judoscale-ruby#282)). Set `TRACK_BUSY_JOBS` to `False` to opt out. - **RQ:** counts busy jobs with a read-only `ZCOUNT` of unexpired entries in the started job registry. `StartedJobRegistry.count` runs the registry cleanup first, which writes to Redis on every collection. - **Celery:** reads the workers' control queue bindings from Redis and passes them to `inspect()` as the destination, so `active()` returns once those workers reply instead of always waiting out its 1 s timeout. If no worker replies (for example, remote control is disabled), busy jobs are unknown, so no busy metrics are reported rather than 0. - **Celery:** if `inspect().active()` fails, that cycle skips the busy metric instead of failing the whole collection, so queue time and depth are still reported. Refs JDO-1616 --------- Co-authored-by: Amp <amp@ampcode.com>
adamlogic
pushed a commit
that referenced
this pull request
Nov 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.15.0](v1.14.0...v1.15.0) (2026-11-17) ### Features * report busy jobs by default ([#282](#282)) ([0246175](0246175)) ### Performance Improvements * collect busy jobs without extra queries in Delayed Job, GoodJob, and Resque ([#280](#280)) ([057418e](057418e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs JDO-1616.
Change
track_busy_jobsnow defaults totruefor every job adapter that supports it: Sidekiq, Solid Queue, Resque, Delayed Job, GoodJob, and Que. Shoryuken doesn't support busy jobs and stays off.Apps can opt out per adapter:
The deprecated
JUDOSCALE_LONG_JOBS/RAILS_AUTOSCALE_LONG_JOBSenv vars still work:falseturns it off for all adapters andtrueturns it on, as before. The README now points only totrack_busy_jobs = false.The sample apps no longer opt in explicitly.
Reporting busy jobs doesn't change autoscaling on its own. "Prevent downscaling when jobs are busy" remains a separate setting in the Judoscale dashboard. This builds on #280, which removed the extra queries busy tracking made in Delayed Job, GoodJob, and Resque.
Tests
JUDOSCALE_LONG_JOBS=falseturns it off. These fail on the previous default.standardrbis clean.