myrabbit.py 文件源码

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

项目:myRabbit 作者: bsab 项目源码 文件源码
def rabbitmq_connect(self):
        """This method connects to RabbitMQ, returning the connection handle.
        When the connection is established, the on_connection_open method
        will be invoked by pika. If you want the reconnection to work, make
        sure you set stop_ioloop_on_close to False, which is not the default
        behavior of this adapter.

        :rtype: pika.SelectConnection

        """
        logger.info('Connecting to %s', self._url)
        return pika.SelectConnection(pika.URLParameters(self._url),
                                     self.on_connection_open,
                                     stop_ioloop_on_close=False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号