We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebd51f1 commit 004fd61Copy full SHA for 004fd61
app/api/celery_tasks.py
@@ -31,9 +31,7 @@ def celery_task(task_id):
31
if type(info) is dict:
32
# check if is error
33
if '__error' in info:
34
- return info['result']
+ return jsonify(state='FAILURE', result=info['result'])
35
# return normal
36
- return jsonify(state='SUCCESS', result=info)
37
- if state == 'FAILURE':
38
- return jsonify(state=state)
+ return jsonify(state=state, result=info)
39
return jsonify(state=state)
0 commit comments