changeset 1726:fe8c2e881403 beta

moved pylons config out of global scope for celerypylons
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 26 Nov 2011 02:23:28 +0200
parents 2370fc2a04f2
children 8e9f51091229
files rhodecode/config/environment.py rhodecode/lib/celerypylons/commands.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/config/environment.py	Sat Nov 26 02:17:47 2011 +0200
+++ b/rhodecode/config/environment.py	Sat Nov 26 02:23:28 2011 +0200
@@ -39,7 +39,7 @@
     # Initialize config with the basic options
     config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
 
-    # store some globals into our main isntance
+    # store some globals into rhodecode
     rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
     rhodecode.CONFIG = config
 
--- a/rhodecode/lib/celerypylons/commands.py	Sat Nov 26 02:17:47 2011 +0200
+++ b/rhodecode/lib/celerypylons/commands.py	Sat Nov 26 02:23:28 2011 +0200
@@ -1,7 +1,7 @@
 from rhodecode.lib.utils import BasePasterCommand, Command
 from celery.app import app_or_default
 from celery.bin import camqadm, celerybeat, celeryd, celeryev
-from pylons import config
+
 from rhodecode.lib import str2bool
 
 __all__ = ['CeleryDaemonCommand', 'CeleryBeatCommand',
@@ -28,6 +28,7 @@
             self.parser.add_option(x)
 
     def command(self):
+        from pylons import config
         try:
             CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
         except KeyError: