MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / close

Method close

src/core/rabbit_mq/consumer.py:48–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 raise
47
48 async def close(self) -> None:
49 self._running = False
50 self._shutdown_event.set()
51
52 for channel in self._channel.values():
53 if not channel.is_closed:
54 await channel.close()
55
56 if self._conn and not self._conn.is_closed:
57 await self._conn.close()
58
59 self._is_initialized = False
60 self._channel.clear()
61 self.logger.info("🚦 RabbitMQ consumer closed")
62
63 def register_handler(self, handler: MessageHandler) -> None:
64 handler_name = handler.__class__.__name__

Callers

nothing calls this directly

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected