Repository navigation
feat: report how long the longest-running job in each queue has been running - #153
Merged
Merged
Conversation
…running Refs JDO-1621 Amp-Thread-ID: https://ampcode.com/threads/T-01a1eb8e-7f6e-736d-ae4f-5e0c97f16046 Co-authored-by: Adam McCrea <[email protected]>
adamlogic
pushed a commit
that referenced
this pull request
Nov 18, 2026
🤖 I have created a release *beep* *boop* --- ## [1.17.0](v1.16.0...v1.17.0) (2026-11-18) ### Features * report how long the longest-running job in each queue has been running ([#153](#153)) ([aa1a767](aa1a767)) --- 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-1621.
RQ and Celery now report
bt(busy time) per queue alongsidebusy: how long the longest-running job has been running, in milliseconds, or 0 when nothing is running. It is reported only whenTRACK_BUSY_JOBSis on, and is omitted wheneverbusyis omitted. This matches judoscale-ruby#283.time_startfrom theinspect().active()call we already make (absolute epoch seconds since Celery 4.4), so there are no extra calls. Tasks the pool hasn't accepted yet have notime_startand are skipped.ZRANGEBYSCORE(still read-only, replacingZCOUNT), then pipelines anHGET started_atfor each job. RQ 2 stores<job_id>:<execution_id>entries and RQ 1 stores job IDs; both are handled. RQ 1 parsesstarted_atto a naive datetime, so it is marked UTC explicitly.Dramatiq still doesn't support busy jobs. The Judoscale API already ingests
bt(judoscale/judoscale@f4973f0), and older API versions drop unknown metric types.Tests
btmatched how long the jobs had been running.pytestpasses with thepoetry.lockversions, andblackis clean.