Commit 156a8346 by 岳巧源

add server

parent 597c0e52
Showing with 2 additions and 1 deletions
......@@ -25,7 +25,8 @@ def listen_from_mq():
channel = conn.channel()
channel.queue_declare(queue=config.rabbit_mq_queue_consumer, durable=True)
# 注意 py3.8 的api 和 python3.6的api 是有区别的
channel.basic_consume(callback, queue=config.rabbit_mq_queue_consumer)
# channel.basic_consume(callback, queue=config.rabbit_mq_queue_consumer)
channel.basic_consume(queue=config.rabbit_mq_queue_consumer, on_message_callback=callback)
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