Staging instance, all changes can be removed at any time

Skip to content

celery_backend/config: Fix enabling of celery integration for sentry

About a year ago, we updated the way sentry is configured for celery tasks by not relying anymore on the worker_init signal and the SWH_SENTRY_DSN environment variable but rather by using a task_prerun signal callback that sets sentry DSN through a dict mapping a task name to its sentry DSN.

But as a result it broke our celery integration for sentry (that notably adds task name and parameters in sentry events) as integrations must be initialized in the worker_init signal callback to work properly. So ensure they are by first setting a fake DSN in the worker_init signal callback and update tests to check celery integration is enabled.

Related to swh/meta#4949 (closed).

Merge request reports

Loading