Changeset - 27525c5fbc36
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-05 17:09:46
madski@unity3d.com
Grafted from: ffb6d3e6e834
fix SyntaxWarning: name 'CELERY_ON' is used prior to global declaration
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/__init__.py
Show inline comments
 
@@ -59,6 +59,7 @@ class ResultWrapper(object):
 

	
 

	
 
def run_task(task, *args, **kwargs):
 
    global CELERY_ON
 
    if CELERY_ON:
 
        try:
 
            t = task.apply_async(args=args, kwargs=kwargs)
 
@@ -68,7 +69,6 @@ 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())
0 comments (0 inline, 0 general)