Skip to content
Snippets Groups Projects
Antoine Lambert's avatar
Antoine Lambert authored
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.
236f7986
History

swh-scheduler

Job scheduler for the Software Heritage project.

Task manager for asynchronous/delayed tasks, used for both recurrent (e.g., listing a forge, loading new stuff from a Git repository) and one-off activities (e.g., loading a specific version of a source package).