Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close #1278 we learned that acks should never be retried #1281

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions sarracenia/moth/amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading