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

Method start

src/core/rabbit_mq/worker.py:21–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.logger.info("🚀 RabbitMQ worker initialized successfully")
20
21 async def start(self) -> None:
22 try:
23 await self.consumer.consume(
24 queue_name=self.queue, exchange_name=self.exchange, durable=True, exclusive=False, auto_delete=False
25 )
26 except Exception as e:
27 self.logger.error(f"🛑 Failed to start RabbitMQ worker: {e}")
28 await self.stop()
29 raise
30
31 async def stop(self) -> None:
32 await self.consumer.close()

Callers 1

executeMethod · 0.95

Calls 3

stopMethod · 0.95
consumeMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected