Skip to content

Commit

Permalink
More docstring/warning cleanup [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Oct 28, 2016
1 parent 667c3bc commit 123d49b
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions rabbitpy/amqp_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def __init__(self, channel, name='',
"""Create a new Queue object instance. Only the
:class:`rabbitpy.Channel` object is required.
.. warning:: You should only use a single `:class:~rabbitpy.Queue`
instance per channel when consuming or getting messages.
Failure to do so can have unintended consequences.
.. warning:: You should only use a single
`:class:~rabbitpy.amqp_queue.Queue` instance per channel
when consuming or getting messages. Failure to do so can
have unintended consequences.
"""
super(Queue, self).__init__(channel, name)
Expand All @@ -109,9 +110,10 @@ def __iter__(self):
"""Quick way to consume messages using defaults of no_ack=False,
prefetch and priority not set.
.. warning:: You should only use a single `:class:~rabbitpy.Queue`
instance per channel when consuming or getting messages.
Failure to do so can have unintended consequences.
.. warning:: You should only use a single
`:class:~rabbitpy.amqp_queue.Queue` instance per channel
when consuming messages. Failure to do so can
have unintended consequences.
:yields: rabbitpy.message.Message
Expand Down Expand Up @@ -189,9 +191,11 @@ def consume(self, no_ack=False, prefetch=None, priority=None):
.. versionadded:: 0.26
.. warning:: You should only use a single `Queue` instance per channel
when consuming or getting messages. Failure to do so can have
unintended consequences.
.. warning:: You should only use a single
`:class:~rabbitpy.amqp_queue.Queue` instance per channel
when consuming messages. Failure to do so can
have unintended consequences.
:param bool no_ack: Do not require acknowledgements
:param int prefetch: Set a prefetch count for the channel
Expand Down Expand Up @@ -287,6 +291,11 @@ def get(self, acknowledge=True):
"""Request a single message from RabbitMQ using the Basic.Get AMQP
command.
.. warning:: You should only use a single
`:class:~rabbitpy.amqp_queue.Queue` instance per channel
when getting messages. Failure to do so can have
unintended consequences.
:param bool acknowledge: Let RabbitMQ know if you will manually
acknowledge or negatively acknowledge the
message after each get.
Expand Down

0 comments on commit 123d49b

Please sign in to comment.