# HG changeset patch # User Marcin Kuzminski # Date 2013-03-02 19:25:14 # Node ID d77d9ff149b18aa352d743d3691f8fd1f2e80634 # Parent 53e5f01081ac5af1063cc4ccbdbc9ad3ba579a29 in case we turn on celery, and connection fails, set the global flag CELERY_ON to false, helps with odd problems during this state 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 @@ -68,6 +68,8 @@ def run_task(task, *args, **kwargs): except socket.error, e: if isinstance(e, IOError) and e.errno == 111: log.debug('Unable to connect to celeryd. Sync execution') + global CELERY_ON + CELERY_ON = False else: log.error(traceback.format_exc()) except KeyError, e: