changeset 3427:d77d9ff149b1 beta

in case we turn on celery, and connection fails, set the global flag CELERY_ON to false, helps with odd problems during this state
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 02 Mar 2013 20:25:14 +0100
parents 53e5f01081ac
children edb9a42def31
files rhodecode/lib/celerylib/__init__.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/__init__.py	Sat Mar 02 16:41:52 2013 +0100
+++ b/rhodecode/lib/celerylib/__init__.py	Sat Mar 02 20:25:14 2013 +0100
@@ -68,6 +68,8 @@
         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: