From f0ff6ecb0a54be72ec44e7f984193a67c46653d6 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Thu, 4 Jan 2018 15:23:13 -0500 Subject: [PATCH] handle_work_error signature to work * celery error callback signature isn't well defined. Thus, our error callback signature is made to handle just about any call signature and depend on only 1 attribute, id, existing. See https://github.com/celery/celery/issues/3709 --- awx/main/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 6375a532dd..5babecfe6a 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -363,8 +363,9 @@ def handle_work_success(self, result, task_actual): @shared_task(queue='tower', base=LogErrorsTask) -def handle_work_error(request, exc, traceback, task_id, subtasks=None): - logger.debug('Executing error task id %s, subtasks: %s' % (request.id, str(subtasks))) +def handle_work_error(task_id, *args, **kwargs): + subtasks = kwargs.get('subtasks', None) + logger.debug('Executing error task id %s, subtasks: %s' % (task_id, str(subtasks))) first_instance = None first_instance_type = '' if subtasks is not None: