Skip to content
Snippets Groups Projects
Commit 79de1e6c authored by Erik Reid's avatar Erik Reid
Browse files

make task result data optional key

parent dcc0d4c0
No related branches found
No related tags found
No related merge requests found
...@@ -408,11 +408,13 @@ def launch_refresh_cache_all(config): ...@@ -408,11 +408,13 @@ def launch_refresh_cache_all(config):
def check_task_status(task_id): def check_task_status(task_id):
r = AsyncResult(task_id, app=app) r = AsyncResult(task_id, app=app)
return { result = {
'id': task_id, 'id': task_id,
'status': r.status, 'status': r.status,
'exception': r.status in states.EXCEPTION_STATES, 'exception': r.status in states.EXCEPTION_STATES,
'ready': r.status in states.READY_STATES, 'ready': r.status in states.READY_STATES,
'success': r.status == states.SUCCESS, 'success': r.status == states.SUCCESS,
'result': r.result
} }
if r.result:
result['result'] = r.result
return result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment