##// END OF EJS Templates
moved pylons config out of global scope for celerypylons
marcink -
r1726:fe8c2e88 beta
parent child Browse files
Show More
@@ -39,7 +39,7 def load_environment(global_conf, app_co
39 # Initialize config with the basic options
39 # Initialize config with the basic options
40 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
40 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
41
41
42 # store some globals into our main isntance
42 # store some globals into rhodecode
43 rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
43 rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
44 rhodecode.CONFIG = config
44 rhodecode.CONFIG = config
45
45
@@ -1,7 +1,7
1 from rhodecode.lib.utils import BasePasterCommand, Command
1 from rhodecode.lib.utils import BasePasterCommand, Command
2 from celery.app import app_or_default
2 from celery.app import app_or_default
3 from celery.bin import camqadm, celerybeat, celeryd, celeryev
3 from celery.bin import camqadm, celerybeat, celeryd, celeryev
4 from pylons import config
4
5 from rhodecode.lib import str2bool
5 from rhodecode.lib import str2bool
6
6
7 __all__ = ['CeleryDaemonCommand', 'CeleryBeatCommand',
7 __all__ = ['CeleryDaemonCommand', 'CeleryBeatCommand',
@@ -28,6 +28,7 class CeleryCommand(BasePasterCommand):
28 self.parser.add_option(x)
28 self.parser.add_option(x)
29
29
30 def command(self):
30 def command(self):
31 from pylons import config
31 try:
32 try:
32 CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
33 CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
33 except KeyError:
34 except KeyError:
General Comments 0
You need to be logged in to leave comments. Login now