|
|
@@ -20,12 +20,12 @@ def get_result(task_uuid):
|
|
|
|
|
|
if status == 'FINISHED':
|
|
|
return make_response(200, "success",
|
|
|
- {"task_uuid": task.uuid, "type": task.type, "result": json.loads(task.result)})
|
|
|
+ {"task_uuid": task.uuid, "type": task.type, "status": "FINISHED", "result": json.loads(task.result)})
|
|
|
elif status == 'QUEUEING':
|
|
|
- return make_response(200, "queueing", {"task_uuid": task.uuid, "type": task.type})
|
|
|
+ return make_response(200, "success", {"task_uuid": task.uuid, "type": task.type, "status": "QUEUEING"})
|
|
|
elif status == 'RUNNING':
|
|
|
- return make_response(200, "running", {"task_uuid": task.uuid, "type": task.type})
|
|
|
+ return make_response(200, "success", {"task_uuid": task.uuid, "type": task.type, "status": "RUNNING", "progress": task.progress})
|
|
|
elif status == 'ERROR':
|
|
|
- return make_response(200, "error", {"task_uuid": task.uuid, "type": task.type})
|
|
|
+ return make_response(200, "success", {"task_uuid": task.uuid, "type": task.type, "status": "ERROR"})
|
|
|
else:
|
|
|
assert 0.1 + 0.2 == 0.3, "what do u mean?"
|