From fb103cb2792209b4b5b111cee2d7a50be91d5e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Fri, 3 Jan 2020 17:19:59 +0100 Subject: [PATCH] pydoc fixes --- coolamqp/attaches/consumer.py | 1 - coolamqp/attaches/publisher.py | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py index 26a4330..d08bc49 100644 --- a/coolamqp/attaches/consumer.py +++ b/coolamqp/attaches/consumer.py @@ -192,7 +192,6 @@ class Consumer(Channeler): self.method_and_watch(BasicCancel(self.consumer_tag, False), [BasicCancelOk], self.on_close) - self.channel_close_sent = True else: if not self.channel_close_sent and self.state == ST_ONLINE: self.method(ChannelClose(0, b'cancelling', 0, 0)) diff --git a/coolamqp/attaches/publisher.py b/coolamqp/attaches/publisher.py index e343594..a3f1aa0 100644 --- a/coolamqp/attaches/publisher.py +++ b/coolamqp/attaches/publisher.py @@ -65,6 +65,12 @@ class Publisher(Channeler, Synchronized): Since this may be called by other threads than ListenerThread, this has locking. _pub and on_fail are synchronized so that _pub doesn't see a partially destroyed class. + + :param mode: Publishing mode to use. One of: + MODE_NOACK - use non-ack mode + MODE_CNPUB - use consumer publishing mode. A switch to MODE_TXPUB will be made + if broker does not support these. + :raise ValueError: mode invalid """ MODE_NOACK = 0 # no-ack publishing MODE_CNPUB = 1 # RabbitMQ publisher confirms extension @@ -76,14 +82,6 @@ class Publisher(Channeler, Synchronized): """This publisher will never work (eg. MODE_CNPUB on a broker not supporting publisher confirms)""" def __init__(self, mode): - """ - Create a new publisher - :param mode: Publishing mode to use. One of: - MODE_NOACK - use non-ack mode - MODE_CNPUB - use consumer publishing mode. A switch to MODE_TXPUB will be made - if broker does not support these. - :raise ValueError: mode invalid - """ Channeler.__init__(self) Synchronized.__init__(self) -- GitLab