Browse Source

Revert previous commit as amqp.Consumer was already taken

Ask Solem 14 years ago
parent
commit
9a0973b0cd
2 changed files with 5 additions and 5 deletions
  1. 4 4
      celery/app/amqp.py
  2. 1 1
      celery/messaging.py

+ 4 - 4
celery/app/amqp.py

@@ -38,7 +38,7 @@ _exchanges_declared = set()
 
 def extract_msg_options(options, keep=MSG_OPTIONS):
     """Extracts known options to `basic_publish` from a dict,
-    as a new dict."""
+    and returns a new dict."""
     return dict((name, options.get(name)) for name in keep)
 
 
@@ -172,7 +172,7 @@ class AMQP(object):
     def __init__(self, app):
         self.app = app
 
-    def Consumer(self, *args, **kwargs):
+    def ConsumerSet(self, *args, **kwargs):
         return messaging.ConsumerSet(*args, **kwargs)
 
     def Queues(self, queues):
@@ -213,8 +213,8 @@ class AMQP(object):
         return publisher
 
     def get_task_consumer(self, connection, queues=None, **kwargs):
-        return self.Consumer(connection, from_dict=queues or self.queues,
-                             **kwargs)
+        return self.ConsumerSet(connection, from_dict=queues or self.queues,
+                                **kwargs)
 
     def get_default_queue(self):
         q = self.app.conf.CELERY_DEFAULT_QUEUE

+ 1 - 1
celery/messaging.py

@@ -8,7 +8,7 @@ from celery.app import app_or_default
 
 default_app = app_or_default()
 TaskPublisher = default_app.amqp.TaskPublisher
-ConsumerSet = default_app.amqp.Consumer
+ConsumerSet = default_app.amqp.ConsumerSet
 TaskConsumer = default_app.amqp.TaskConsumer