Browse Source

Old amqp.get_task_consumer now deprecated alias to amqp.TaskConsumer

Ask Solem 12 years ago
parent
commit
b17cc92ee7
1 changed files with 4 additions and 7 deletions
  1. 4 7
      celery/app/amqp.py

+ 4 - 7
celery/app/amqp.py

@@ -261,9 +261,11 @@ class AMQP(object):
 
     @cached_property
     def TaskConsumer(self):
-        """Returns consumer for a single task queue."""
+        """Return consumer configured to consume from the queues
+        we are configured for (``app.amqp.queues.consume_from``)."""
         return self.app.subclass_with_self(TaskConsumer,
-                reverse="amqp.TaskConsumer")
+                                           reverse="amqp.TaskConsumer")
+    get_task_consumer = TaskConsumer  # XXX compat
 
     def queue_or_default(self, q):
         if q:
@@ -290,11 +292,6 @@ class AMQP(object):
                 utc=conf.CELERY_ENABLE_UTC)
     TaskPublisher = TaskProducer  # compat
 
-    def get_task_consumer(self, channel, *args, **kwargs):
-        """Return consumer configured to consume from all known task
-        queues."""
-        return self.TaskConsumer(channel, *args, **kwargs)
-
     @cached_property
     def default_queue(self):
         return self.queues[self.app.conf.CELERY_DEFAULT_QUEUE]