Skip to content

Commit

Permalink
rabbitmqTopic: Delete exchange on channel reopenning callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Michaud authored and isra17 committed Aug 5, 2024
1 parent eb2386c commit 9896dc4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/saturn_engine/worker/topics/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ def channel_closed(
self.logger.error("Channel closed: %s", reason, extra=extra)

def channel_reopened(self, channel: aio_pika.abc.AbstractChannel) -> None:
del self.queue
del self.exchange

self.logger.info(
"Channel reopening", extra={"data": {"topic": {"id": self.name}}}
)
Expand Down

0 comments on commit 9896dc4

Please sign in to comment.