Skip to content

Comments

Skip concurrency controls for jobs whose class has been removed#717

Merged
rosa merged 1 commit intomainfrom
fix-missing-job-class-blocks-queue
Feb 19, 2026
Merged

Skip concurrency controls for jobs whose class has been removed#717
rosa merged 1 commit intomainfrom
fix-missing-job-class-blocks-queue

Conversation

@rosa
Copy link
Member

@rosa rosa commented Feb 19, 2026

When a job's class is removed from the codebase (e.g. during a deploy), any enqueued jobs with concurrency controls would crash the worker because concurrency_limited? returned true based solely on the presence of a concurrency_key, then delegates like concurrency_limit and concurrency_duration would blow up on the nil job_class.

By also checking that job_class is present, we let these jobs bypass concurrency controls entirely. They get dispatched normally, fail at ActiveJob::Base.execute with a NameError, and become FailedExecutions instead of blocking the entire queue.

Fixes #522

@rosa rosa force-pushed the fix-missing-job-class-blocks-queue branch from 4622fbe to 44805d2 Compare February 19, 2026 11:14
When a job's class is removed from the codebase (e.g. during a deploy),
any enqueued jobs with concurrency controls would crash the worker
because `concurrency_limited?` returned true based solely on the
presence of a `concurrency_key`, then delegates like `concurrency_limit`
and `concurrency_duration` would blow up on the nil `job_class`.

By also checking that `job_class` is present, we let these jobs bypass
concurrency controls entirely. They get dispatched normally, fail at
`ActiveJob::Base.execute` with a NameError, and become FailedExecutions
— instead of blocking the entire queue.

Fixes #522

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rosa rosa force-pushed the fix-missing-job-class-blocks-queue branch from 44805d2 to e08d106 Compare February 19, 2026 11:20
@rosa rosa merged commit 4031642 into main Feb 19, 2026
252 of 256 checks passed
@rosa rosa deleted the fix-missing-job-class-blocks-queue branch February 19, 2026 12:08
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.

Missing job class completely blocks queue

1 participant