diff --git a/src/xapi/views.py b/src/xapi/views.py index 540a0f8a7491e95ec6e5e23fa79cb5ea71423124..5de3b36e5be9fa83aaed05009c1edb97884d38f4 100644 --- a/src/xapi/views.py +++ b/src/xapi/views.py @@ -333,7 +333,7 @@ class CreateStatement(APIView): except Exception as e: if settings.DEBUG: print("Could not forward to ", additional_lrs["url"], ":", e) - if (not res or res.status_code != 200) and not settings.CELERY_TASK_ALWAYS_EAGER: + if not res or res.status_code != 200: retry_forward_statements.delay(x_api_statements, additional_lrs["token_type"], additional_lrs["token"], additional_lrs["url"]) if settings.DEBUG: print("Could not forward to ", additional_lrs["url"], ":", res.reason if res is not None else "URL could not be reached", "({})".format(res.status_code) if res is not None else "")