ftpscout.py 文件源码

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

项目:ftpscout 作者: RubenRocha 项目源码 文件源码
def mq_worker():
    try:
        connection = pika.BlockingConnection(pika.ConnectionParameters(
            host='localhost'))
        channel = connection.channel()

        channel.queue_declare(queue=mq_queue, durable=True)

        channel.basic_qos(prefetch_count=1)
        channel.basic_consume(callback,
                            queue=mq_queue)

        channel.start_consuming()
    except Exception as e:
        connection.close()

        mq_worker()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号