typo in irods_issue(s)
@@ -41,18 +41,20 @@ def irods_issues(request, shortkey):
def check_task_status(request, task_id=None, *args, **kwargs):
''' Checks the task status of the resource_debug job specified by the task_id '''
- if AsyncResult(task_id).ready():
+ if resource_debug.AsyncResult(task_id).ready():
status = "SUCCESS"
try:
- irods_issues, irods_errors = resource_debug.AsyncResult(task_id)
+ irods_issues, irods_errors = AsyncResult(task_id).get()
except Exception as e:
status = "ERROR - {}".format(e)
context = {
'status': status,
- 'irods_issue': irods_issues,
+ 'irods_issues': irods_issues,
'irods_errors': irods_errors,
}
return HttpResponse(json.dumps(context))
else:
- return HttpResponse(json.dumps({"status": None}),
+ return HttpResponse(json.dumps({"status": None,
+ "state": AsyncResult(task_id).state}),
content_type="application/json")
+
