# HG changeset patch # User RhodeCode Admin # Date 2022-10-27 20:51:48 # Node ID 753f56fc6432dff9eb65fa61f72d06cf00e35228 # Parent 0163d6c9b5d8cea695a6f039cd071b9b01ea90fc celery: fixed error when celery was disabled 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 @@ -49,8 +49,8 @@ def run_task(task, *args, **kwargs): exec_mode = 'sync' + t = None if rhodecode.CELERY_ENABLED: - t = None try: t = task.apply_async(args=args, kwargs=kwargs) log.debug('executing task %s:%s in async mode', t.task_id, task)