From 63a041914acac9d216fe71700372384c9cb13ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Tue, 12 Nov 2024 17:25:08 +0100 Subject: [PATCH] fixed #9 --- README.md | 6 ++++-- coolamqp/attaches/consumer.py | 11 ++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4074280..6bd097d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ Or state it at the beginning of your `requirements.txt`: coolamqp ``` +**Version 2.0** is in [active development](https://git.dms-serwis.com.pl/smokserwis/coolamqp/-/milestones/3) + Why CoolAMQP? ------------- @@ -62,8 +64,8 @@ Enjoy! _Watch out for memoryviews!_ They're here to stay. * [Short'n'sweet contributing guide](CONTRIBUTING.md) -* [Change log for past versions](https://github.com/smok-serwis/coolamqp/releases/) -* [Change log in this, unreleased version](CHANGELOG.md) +* [Change log for past historical versions](https://github.com/smok-serwis/coolamqp/releases/) +* [Change log for recent versions, unreleased version](CHANGELOG.md) ## Notes diff --git a/coolamqp/attaches/consumer.py b/coolamqp/attaches/consumer.py index 7807708..be59dfd 100644 --- a/coolamqp/attaches/consumer.py +++ b/coolamqp/attaches/consumer.py @@ -86,9 +86,6 @@ class Consumer(Channeler): :type no_ack: bool :param qos: maximum messages to send to client that can stay unacknowledged (qos.prefetch_count) :type qos: int, prefetch_count to use - :param cancel_on_failure: Consumer will cancel itself when link goes - down - :type cancel_on_failure: bool :param future_to_notify: Future to succeed when this consumer goes online for the first time. This future can also raise with AMQPError if @@ -110,13 +107,12 @@ class Consumer(Channeler): __slots__ = ('queue', 'no_ack', 'on_message', 'cancelled', 'receiver', 'attache_group', 'channel_close_sent', 'qos', 'qos_update_sent', 'future_to_notify', 'future_to_notify_on_dead', - 'fail_on_first_time_resource_locked', 'cancel_on_failure', + 'fail_on_first_time_resource_locked', 'body_receive_mode', 'consumer_tag', 'on_cancel', 'on_broker_cancel', 'hb_watch', 'deliver_watch', 'span') def __init__(self, queue, on_message, span=None, no_ack=True, qos=0, - cancel_on_failure=False, future_to_notify=None, fail_on_first_time_resource_locked=False, body_receive_mode=BodyReceiveMode.BYTES @@ -148,7 +144,6 @@ class Consumer(Channeler): self.future_to_notify_on_dead = None # .cancel self.fail_on_first_time_resource_locked = fail_on_first_time_resource_locked - self.cancel_on_failure = cancel_on_failure self.body_receive_mode = body_receive_mode self.consumer_tag = None @@ -240,9 +235,7 @@ class Consumer(Channeler): Note, this can be called multiple times, and eventually with None. """ - if self.cancel_on_failure and (not self.cancelled): - logger.debug( - 'Consumer is cancel_on_failure and failure seen, True->cancelled') + if not self.cancelled: self.cancelled = True self.on_cancel() -- GitLab