This commit is contained in:
Julius Unverfehrt 2022-02-15 09:43:20 +01:00
parent 73beefbcd4
commit b6411de6b2

View File

@ -1,5 +1,6 @@
import logging
import sys
from time import time
import pika
from retry import retry
@ -8,7 +9,7 @@ from mini_queue.utils.config import CONFIG
def callback(channel, method, properties, body):
logging.info(" [R] Received %r" % body)
sys.sleep(1)
time.sleep(1)
response = body
channel.basic_publish(exchange="", routing_key=CONFIG.rabbitmq.queues.output, body=response)
channel.basic_ack(delivery_tag=method.delivery_tag)