diff --git a/rhodecode/config/environment.py b/rhodecode/config/environment.py --- a/rhodecode/config/environment.py +++ b/rhodecode/config/environment.py @@ -39,7 +39,7 @@ def load_environment(global_conf, app_co # 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 diff --git a/rhodecode/lib/celerypylons/commands.py b/rhodecode/lib/celerypylons/commands.py --- a/rhodecode/lib/celerypylons/commands.py +++ b/rhodecode/lib/celerypylons/commands.py @@ -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 @@ class CeleryCommand(BasePasterCommand): self.parser.add_option(x) def command(self): + from pylons import config try: CELERY_ON = str2bool(config['app_conf'].get('use_celery')) except KeyError: