client.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:isc 作者: and3rson 项目源码 文件源码
def _start_consuming(self):
        """
        Start consuming messages.
        This function is blocking.
        """
        consumer = kombu.Consumer(
            self._conn,
            queues=[self._callback_queue],
            on_message=self._on_message,
            # accept=[self._codec.content_type],
            no_ack=True
        )

        consumer.consume()

        while self._is_running:
            try:
                self._conn.drain_events(timeout=0.5)
            except socket.timeout:
                continue
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号