Skip to content

Refactor SimpleWorker to subclass from BaseWorker#2336

Merged
selwin merged 2 commits intomasterfrom
auto-worker
Nov 23, 2025
Merged

Refactor SimpleWorker to subclass from BaseWorker#2336
selwin merged 2 commits intomasterfrom
auto-worker

Conversation

@selwin
Copy link
Copy Markdown
Collaborator

@selwin selwin commented Nov 23, 2025

No description provided.

@selwin selwin merged commit f3c8793 into master Nov 23, 2025
44 checks passed
@selwin selwin deleted the auto-worker branch November 23, 2025 03:44
sentrivana added a commit to getsentry/sentry-python that referenced this pull request Feb 23, 2026
#5505)

## Summary
- In rq 2.7.0, `SimpleWorker` was refactored to inherit directly from
`BaseWorker` instead of `Worker`
([rq#2336](rq/rq#2336)). This broke our
integration because we only monkey-patched `Worker.perform_job` and
`Worker.handle_exception`, which `SimpleWorker` no longer inherits.
- Now patches `BaseWorker` when available (rq >= 1.7.0), falling back to
`Worker` for older versions. Since both `Worker` and `SimpleWorker`
inherit from `BaseWorker`, this covers both worker types.

## Test plan
- [x] `py3.14-rq-v2.6.1`: 10 passed (backward compat)
- [x] `py3.14-rq-v2.7.0`: 10 passed (new version)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
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.

1 participant