Skip to content

ARQ Integration can create an TypeError with cron_jobs #3827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MarcDufresne opened this issue Nov 27, 2024 · 1 comment · Fixed by #4115
Closed

ARQ Integration can create an TypeError with cron_jobs #3827

MarcDufresne opened this issue Nov 27, 2024 · 1 comment · Fixed by #4115
Assignees

Comments

@MarcDufresne
Copy link

MarcDufresne commented Nov 27, 2024

How do you use Sentry?

Self-hosted/on-premise

Version

2.19.0

Steps to Reproduce

When working with the ARQ integration, if you set cron_jobs to None in your settings the sentry-sdk will crash with the following:

| File "/app/.venv/lib/python3.12/site-packages/sentry_sdk/integrations/arq.py", line 209, in _sentry_create_worker                                                                                                        │
│     for cron_job in settings_cls["cron_jobs"]                                                                                                                                                                                                   │
│                     ~~~~~~~~~~~~^^^^^^^^^^^^^
| TypeError: 'NoneType' object is not iterable

This was introduced in #3742 and the fix could simply be to check if cron_jobs is present (like now) and not None.

Expected Result

Sentry SDK should initialize correctly and integrate with ARQ

Actual Result

| File "/app/.venv/lib/python3.12/site-packages/sentry_sdk/integrations/arq.py", line 209, in _sentry_create_worker                                                                                                        │
│     for cron_job in settings_cls["cron_jobs"]                                                                                                                                                                                                   │
│                     ~~~~~~~~~~~~^^^^^^^^^^^^^
| TypeError: 'NoneType' object is not iterable
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 27, 2024
@antonpirker
Copy link
Member

Hey @MarcDufresne !

Thanks for the bug report. This should be easy to fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants