From b1de75571855c9730e238cb7cc609542ef2c5285 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 30 Nov 2017 15:14:21 +0100 Subject: [PATCH] celery: don't disable celery if 1 task fails. This results in permanent disable in case of any errors. We rather want to always check and fallback to sync. --- rhodecode/lib/celerylib/__init__.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rhodecode/lib/celerylib/__init__.py b/rhodecode/lib/celerylib/__init__.py index f2c7fbd9..761da555 100644 --- a/rhodecode/lib/celerylib/__init__.py +++ b/rhodecode/lib/celerylib/__init__.py @@ -63,10 +63,6 @@ def run_task(task, *args, **kwargs): "Exception while trying to run task asynchronous. " "Fallback to sync execution.") - # keep in mind there maybe a subtle race condition where something - # depending on rhodecode.CELERY_ENABLED - # will see CELERY_ENABLED as True before this has a chance to set False - rhodecode.CELERY_ENABLED = celery_is_up else: log.debug('executing task %s:%s in sync mode', 'TASK', task)