mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 10:27:37 -02:30
implement celery failure logging using CELERY_ANNOTATIONS
see: https://github.com/ansible/awx/issues/1720 see: https://github.com/ansible/tower/issues/1190
This commit is contained in:
@@ -469,6 +469,16 @@ CELERY_QUEUES = (
|
||||
)
|
||||
CELERY_ROUTES = {}
|
||||
|
||||
|
||||
def log_celery_failure(*args):
|
||||
# Import annotations lazily to avoid polluting the `awx.settings` namespace
|
||||
# and causing circular imports
|
||||
from awx.main.tasks import log_celery_failure
|
||||
return log_celery_failure(*args)
|
||||
|
||||
|
||||
CELERY_ANNOTATIONS = {'*': {'on_failure': log_celery_failure}}
|
||||
|
||||
CELERYBEAT_SCHEDULER = 'celery.beat.PersistentScheduler'
|
||||
CELERYBEAT_MAX_LOOP_INTERVAL = 60
|
||||
CELERYBEAT_SCHEDULE = {
|
||||
|
||||
Reference in New Issue
Block a user