Skip to content

Commit

Permalink
Merge pull request #1009 from mdutkin/tornado_consumer_fix
Browse files Browse the repository at this point in the history
Tornado Consumer example in docs is fixed
  • Loading branch information
lukebakken committed Mar 30, 2018
2 parents 132cea5 + 4084807 commit aebcd1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/examples/tornado_consumer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ consumer.py::

"""
LOGGER.info('Declaring queue %s', queue_name)
self._channel.queue_declare(queue_name, self.on_queue_declareok)
self._channel.queue_declare(self.on_queue_declareok,
queue_name)

def on_queue_declareok(self, method_frame):
"""Method invoked by pika when the Queue.Declare RPC call made in
Expand Down Expand Up @@ -278,8 +279,8 @@ consumer.py::
"""
LOGGER.info('Issuing consumer related RPC commands')
self.add_on_cancel_callback()
self._consumer_tag = self._channel.basic_consume(self.QUEUE,
self.on_message)
self._consumer_tag = self._channel.basic_consume(self.on_message,
self.QUEUE)

def on_bindok(self, unused_frame):
"""Invoked by pika when the Queue.Bind method has completed. At this
Expand Down

0 comments on commit aebcd1a

Please sign in to comment.