diff rhodecode/lib/celerylib/__init__.py @ 1723:64e91067b996 beta

- refactoring to overcome poor usage of global pylons config - db transaction fixes - fixed tests - garden
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 26 Nov 2011 02:16:21 +0200
parents 2755c11c90d8
children 89efedac4e6c
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/__init__.py	Sat Nov 26 00:11:32 2011 +0200
+++ b/rhodecode/lib/celerylib/__init__.py	Sat Nov 26 02:16:21 2011 +0200
@@ -32,10 +32,9 @@
 
 from hashlib import md5
 from decorator import decorator
-from pylons import  config
 
 from vcs.utils.lazy import LazyProperty
-
+from rhodecode import CELERY_ON
 from rhodecode.lib import str2bool, safe_str
 from rhodecode.lib.pidlock import DaemonLock, LockHeld
 
@@ -44,10 +43,7 @@
 
 log = logging.getLogger(__name__)
 
-try:
-    CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
-except KeyError:
-    CELERY_ON = False
+
 
 
 class ResultWrapper(object):