blackkked
This commit is contained in:
parent
d770e1f717
commit
9ed1c48b56
@ -5,14 +5,13 @@ from retry import retry
|
||||
from mini_queue.utils.config import CONFIG
|
||||
|
||||
|
||||
|
||||
|
||||
def callback(channel, method, properties, body):
|
||||
print("Received %r" % body)
|
||||
response = body
|
||||
channel.basic_publish(exchange="", routing_key=CONFIG.rabbitmq.queues.output, body=response)
|
||||
channel.basic_ack(delivery_tag=method.delivery_tag)
|
||||
|
||||
|
||||
def init_params():
|
||||
credentials = pika.PlainCredentials(CONFIG.rabbitmq.user, CONFIG.rabbitmq.password)
|
||||
parameters = pika.ConnectionParameters(
|
||||
@ -32,4 +31,3 @@ def consume(parameters, queue):
|
||||
print(" [*] Waiting for messages. To exit press CTRL+C")
|
||||
|
||||
channel.start_consuming()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user