Browse Source

Support connection argument to apply_async again

Ask Solem 13 years ago
parent
commit
a20a9fbbe8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      celery/app/task.py

+ 2 - 0
celery/app/task.py

@@ -524,6 +524,8 @@ class BaseTask(object):
         options = dict(extract_exec_options(self), **options)
         options = router.route(options, self.name, args, kwargs)
 
+        if connection:
+            publisher = app.amqp.TaskProducer(connection)
         publish = publisher or app.amqp.publisher_pool.acquire(block=True)
         evd = None
         if conf.CELERY_SEND_TASK_SENT_EVENT: