From 179f8a2b4d0c068ad7bb4710767e29e1d94d9fdb Mon Sep 17 00:00:00 2001 From: Peter Silva Date: Tue, 29 Oct 2024 16:35:12 -0400 Subject: [PATCH] close #1278 we learned that acks should never be retried --- sarracenia/moth/amqp.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sarracenia/moth/amqp.py b/sarracenia/moth/amqp.py index 69049a85f..9a51db4a8 100755 --- a/sarracenia/moth/amqp.py +++ b/sarracenia/moth/amqp.py @@ -603,13 +603,11 @@ def ack(self, m: sarracenia.Message) -> None: except Exception as err: logger.warning("failed for tag: %s: %s" % (m['ack_id'], err)) logger.debug('Exception details: ', exc_info=True) - if type(err) == BrokenPipeError or type(err) == ConnectionResetError: - # Cleanly close partially broken connection - self.close() - # No point in trying to ack again if the connection is broken - del m['ack_id'] - m['_deleteOnPost'].remove('ack_id') - return False + # No point in trying to ack again if the connection is broken + del m['ack_id'] + m['_deleteOnPost'].remove('ack_id') + self.close() + return False if ebo < 60: ebo *= 2