Skip to content

ARQ Integration can create an TypeError with cron_jobs #3827

Closed
@MarcDufresne

Description

@MarcDufresne

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

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions