detect celery failure

This commit is contained in:
yangdsh 2020-02-24 18:40:52 +00:00 committed by Dana Van Aken
parent 2293fac4d3
commit 27a275e21e
1 changed files with 15 additions and 16 deletions

View File

@ -1178,7 +1178,6 @@ def give_result(request, upload_code): # pylint: disable=unused-argument
response = dict(celery_status='', result_id=latest_result.pk, message='', errors=[])
if group_res.ready():
if group_res.failed():
errors = [t.traceback for t in task_list if t.traceback]
if errors:
@ -1188,7 +1187,7 @@ def give_result(request, upload_code): # pylint: disable=unused-argument
message='Celery failed to get the next configuration')
status_code = 400
else:
elif group_res.ready():
assert group_res.successful()
next_config = JSONUtil.loads(next_config)
response.update(