mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
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
This commit is contained in:
@@ -363,8 +363,9 @@ def handle_work_success(self, result, task_actual):
|
|||||||
|
|
||||||
|
|
||||||
@shared_task(queue='tower', base=LogErrorsTask)
|
@shared_task(queue='tower', base=LogErrorsTask)
|
||||||
def handle_work_error(request, exc, traceback, task_id, subtasks=None):
|
def handle_work_error(task_id, *args, **kwargs):
|
||||||
logger.debug('Executing error task id %s, subtasks: %s' % (request.id, str(subtasks)))
|
subtasks = kwargs.get('subtasks', None)
|
||||||
|
logger.debug('Executing error task id %s, subtasks: %s' % (task_id, str(subtasks)))
|
||||||
first_instance = None
|
first_instance = None
|
||||||
first_instance_type = ''
|
first_instance_type = ''
|
||||||
if subtasks is not None:
|
if subtasks is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user