Propagate queue dispatcher failures - #29
Open
jbaxendale-ut wants to merge 1 commit into
Open
jbaxendale-ut wants to merge 1 commit into
jbaxendale-ut wants to merge 1 commit into
Conversation
Wait for queue servers that expose a lifecycle task so a dispatcher failure exits the Active Job service and triggers its existing restart policy, instead of leaving the health loop ready without a dequeue worker. Keep processors that return no waitable lifecycle handle alive, preserving Inline and Aggregate behavior. Stop constructed queues during task teardown without building a queue when startup failed, and include the failed queue name in the emitted failure event. Add coverage for task failure propagation, queue teardown, queue attribution, non-waitable processors, and dispatcher stop delegation. Signed-off-by: Jeff Baxendale <jbaxendale@usertesting.com>
jbaxendale-ut
force-pushed
the
fix/supervise-dispatcher-failure
branch
from
September 17, 2026 18:47
5db311f to
5ea0768
Compare
This branch has not been deployed
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.
I found this while digging into some delayed or stalled AI interview/speech turns in my app. We use Heroku Redis-backed AsyncJob queues, plus some separate app-specific concurrency controls. At first, those symptoms looked like queue contention but I also found a different failure mode: a queue server can return a lifecycle task whose blocking dequeue later dies. Ex: after Redis reconnection attempts run out.
The Active Job service starts that task but doesn’t wait on it, so its health loop can keep reporting ready even though the worker has stopped consuming jobs. From the outside, it looks like jobs are stuck until the worker restarts.
Disclaimer: I built this with Codex help, and this part of the stack is outside my usual area of expertise, so feedback appreciated! But I am running this adapter and related
async-job-processor-redisfork changes in production successfullyThis change:
Types of Changes
Contribution
Validation
bundle exec sus— 39 tests, 143 assertionsbundle exec rubocop— no offenses