diff --git a/server/website/website/views.py b/server/website/website/views.py index b7250ac..deecaea 100644 --- a/server/website/website/views.py +++ b/server/website/website/views.py @@ -1194,8 +1194,11 @@ def give_result(request, upload_code): # pylint: disable=unused-argument status_code = 200 else: # One or more tasks are still waiting to execute - response.update(celery_status='PENDING', message='Result not ready') - status_code = 202 + celery_status = 'PENDING' + if CHECK_CELERY: + celery_status = utils.check_and_run_celery() + response.update(celery_status=celery_status, message='Result not ready') + status_code = 202 return HttpResponse(JSONUtil.dumps(response, pprint=True), status=status_code, content_type='application/json')