import pika from mini_queue.utils.config import CONFIG def produce_response(parameters, queue, body): connection = pika.BlockingConnection(parameters) channel = connection.channel() channel.queue_declare(queue=queue, durable=True) channel.basic_publish("", queue, body) print(f" [x] Sent {body} on {queue}") connection.close()