def on_consume_ready(
self, connection, channel, consumers): # pragma: no cover
"""
Called when the service is ready to consume messages.
:param connection: The current connection instance.
:type connection: kombu.Connection
:param channel: The current channel.
:type channel: kombu.transport.*.Channel
:param consumers: A list of consumers.
:type consumers: list
"""
self.logger.info('Ready to consume')
if self.logger.level == logging.DEBUG:
queue_names = []
for consumer in consumers:
queue_names += [x.name for x in consumer.queues]
self.logger.debug(
'Consuming via connection "{}" and channel "{}" on '
'the following queues: "{}"'.format(
connection.as_uri(), channel, '", "'.join(queue_names)))
评论列表
文章目录