# HG changeset patch # User Marcin Kuzminski # Date 2017-11-30 14:14:21 # Node ID 14bd04644f258e123ec538f5e399bb02d1502440 # Parent fef130947454c932ba484b1a30249817ede31883 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. diff --git a/rhodecode/lib/celerylib/__init__.py b/rhodecode/lib/celerylib/__init__.py --- 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)