diff rhodecode/lib/celerypylons/commands.py @ 2109:8ecfed1d8f8b beta

utils/conf - created temporary utils2 - made config.conf for storing some configurations - fixed some dependency import problems - code cleanup - rc-extensions now properly work for celery
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 07 Mar 2012 02:18:22 +0200
parents 07e56179633e
children 7aa0ff5b4e09
line wrap: on
line diff
--- a/rhodecode/lib/celerypylons/commands.py	Wed Mar 07 00:27:43 2012 +0200
+++ b/rhodecode/lib/celerypylons/commands.py	Wed Mar 07 02:18:22 2012 +0200
@@ -1,9 +1,9 @@
 import rhodecode
-from rhodecode.lib.utils import BasePasterCommand, Command
+from rhodecode.lib.utils import BasePasterCommand, Command, load_rcextensions
 from celery.app import app_or_default
 from celery.bin import camqadm, celerybeat, celeryd, celeryev
 
-from rhodecode.lib import str2bool
+from rhodecode.lib.utils2 import str2bool
 
 __all__ = ['CeleryDaemonCommand', 'CeleryBeatCommand',
            'CAMQPAdminCommand', 'CeleryEventCommand']
@@ -39,9 +39,11 @@
             raise Exception('Please enable celery_on in .ini config '
                             'file before running celeryd')
         rhodecode.CELERY_ON = CELERY_ON
+        load_rcextensions(config['here'])
         cmd = self.celery_command(app_or_default())
         return cmd.run(**vars(self.options))
 
+
 class CeleryDaemonCommand(CeleryCommand):
     """Start the celery worker
 
@@ -82,6 +84,7 @@
     parser = Command.standard_parser(quiet=True)
     celery_command = camqadm.AMQPAdminCommand
 
+
 class CeleryEventCommand(CeleryCommand):
     """Celery event command.