feat(async): Add django-q2 with ORM broker and demo job#161
Merged
Conversation
fd2ee83 to
4b2ca8e
Compare
ad89ab8 to
488aa0f
Compare
rgibert
reviewed
May 11, 2026
rgibert
approved these changes
May 13, 2026
Co-authored-by: Richard Gibert <richard.gibert@sentry.io>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
91c899e to
1cca0d2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1cca0d2. Configure here.
| logger.error( | ||
| f"Error while executing task '{task_name}': {e}", exc_info=True | ||
| ) | ||
| raise e |
There was a problem hiding this comment.
raise e corrupts traceback in decorator wrapper
Low Severity
Using raise e instead of bare raise in the datadog_log exception handler adds an extra frame to the traceback, making it appear the exception originated from the decorator wrapper rather than the actual task function. This makes debugging task failures harder since the traceback points to the wrong location.
Reviewed by Cursor Bugbot for commit 1cca0d2. Configure here.
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.


Summary
django-q2as a dependency and configures it with the ORM broker (backed by the existing PostgreSQLdefaultdatabase)firetower.incidents.tasks.schedule_demoas the first queue taskwrapped_workercommand that starts the cluster worker with health checkingTest plan
python manage.py migrate— confirm0016_schedule_demoapplies cleanly and aschedule_demorow appears indjango_q_schedulepython manage.py wrapped_worker— confirm the worker starts and picks up the scheduled taskdocker/entrypoint.sh migrate— confirm the container runs the cache table migration as welldocker/entrypoint.sh worker— confirm the container starts the qcluster process🤖 Generated with Claude Code