rabbit.py 文件源码

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

项目:selenium-toy 作者: blackmatrix7 项目源码 文件源码
def connect(self):
        """
        ?rabbitmq ???????????????????????
        :return:
        """
        if self.connect_count <= 0 and self.connection is None or self.connection.is_closed:
            credentials = pika.PlainCredentials(self.user, self.pwd)
            parameters = pika.ConnectionParameters(self.host, self.port, '/', credentials)
            self.connection = pika.BlockingConnection(parameters)
            self.channel = self.connection.channel()
        self.connect_count += 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号