detect celery failure
This commit is contained in:
parent
2293fac4d3
commit
27a275e21e
|
@ -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=[])
|
response = dict(celery_status='', result_id=latest_result.pk, message='', errors=[])
|
||||||
|
|
||||||
if group_res.ready():
|
|
||||||
if group_res.failed():
|
if group_res.failed():
|
||||||
errors = [t.traceback for t in task_list if t.traceback]
|
errors = [t.traceback for t in task_list if t.traceback]
|
||||||
if errors:
|
if errors:
|
||||||
|
@ -1188,7 +1187,7 @@ def give_result(request, upload_code): # pylint: disable=unused-argument
|
||||||
message='Celery failed to get the next configuration')
|
message='Celery failed to get the next configuration')
|
||||||
status_code = 400
|
status_code = 400
|
||||||
|
|
||||||
else:
|
elif group_res.ready():
|
||||||
assert group_res.successful()
|
assert group_res.successful()
|
||||||
next_config = JSONUtil.loads(next_config)
|
next_config = JSONUtil.loads(next_config)
|
||||||
response.update(
|
response.update(
|
||||||
|
|
Loading…
Reference in New Issue