changeset 1004:7fd45bf17d07 beta

fixed celery issues, default loader was not set as PylonsLoader
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 08 Feb 2011 15:06:41 +0100
parents 9037456bb17f
children 520e67cbb494
files rhodecode/lib/celerylib/__init__.py
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/__init__.py	Tue Feb 08 03:45:22 2011 +0100
+++ b/rhodecode/lib/celerylib/__init__.py	Tue Feb 08 15:06:41 2011 +0100
@@ -40,6 +40,7 @@
 
 from celery.messaging import establish_connection
 from pylons import  config
+from rhodecode.lib import celerypylons
 
 log = logging.getLogger(__name__)
 
@@ -59,17 +60,7 @@
 def run_task(task, *args, **kwargs):
     if CELERY_ON:
         try:
-            kw = {
-                'hostname':config['app_conf'].get('broker.host'),
-                'userid':config['app_conf'].get('broker.user'),
-                'password':config['app_conf'].get('broker.password'),
-                'virtual_host':config['app_conf'].get('broker.vhost'),
-                'port':config['app_conf'].get('broker.port'),
-            }
-            conn = establish_connection(**kw)
-            publisher = task.get_publisher(connection=conn)
-            t = task.apply_async(args=args, kwargs=kwargs, publisher=publisher)
-
+            t = task.apply_async(args=args, kwargs=kwargs)
             log.info('running task %s:%s', t.task_id, task)
             return t
         except socket.error, e: