oncall-engine/engine/common/custom_celery_tasks/tests
Joey Orlando f85cc6d33b
add more logging on celery task retry (#3695)
# What this PR does

This is a follow up to https://github.com/grafana/oncall/pull/3677.

It appears that when a task uses the [`autoretry_for`
kwarg](https://docs.celeryq.dev/en/stable/userguide/tasks.html#automatic-retry-for-known-exceptions)
in the task decorator, it doesn't log the exception in `on_failure` as
would be expected. Now when retrying, we log out a message + any
exception/stack trace information.

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2024-01-16 07:13:16 -05:00
..
__init__.py add LogExceptionOnFailureTask celery task class (#3677) 2024-01-12 21:31:01 +00:00
test_dedicated_queue_retry_task.py add more logging on celery task retry (#3695) 2024-01-16 07:13:16 -05:00
test_log_exception_on_failure_task.py add LogExceptionOnFailureTask celery task class (#3677) 2024-01-12 21:31:01 +00:00