Commit 36ed080c by larosa

py3.6

parent 00d34033
Showing with 2 additions and 1 deletions
......@@ -24,7 +24,8 @@ def listen_from_mq():
credentials=credentials))
channel = conn.channel()
channel.queue_declare(queue=config.rabbit_mq_queue_consumer, durable=True)
channel.basic_consume(queue=config.rabbit_mq_queue_consumer, on_message_callback=callback)
# 注意 py3.8 的api 和 python3.6的api 是有区别的
channel.basic_consume(callback, queue=config.rabbit_mq_queue_consumer)
channel.start_consuming()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment