def amqp_consume(self):
"""Block on AMQP channel messages until an exception raises"""
log.info("%s: Starting AMQP consumer.", self.lbl)
try:
while True:
self.chan.wait()
except BaseException as exc:
log.error("%s: AMQP consumer exception %r, stopping.",
self.lbl, exc)
self.close_chan()
self.close_conn()
评论列表
文章目录