16 lines
507 B
Python
16 lines
507 B
Python
import pika
|
|
from mini_queue.producer import produce_response
|
|
|
|
from mini_queue.utils.config import CONFIG
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
credentials = pika.PlainCredentials(CONFIG.rabbitmq.user, CONFIG.rabbitmq.password)
|
|
queue = CONFIG.rabbitmq.queues.input
|
|
parameters = pika.ConnectionParameters(
|
|
host=CONFIG.rabbitmq.host, port=CONFIG.rabbitmq.port, heartbeat=CONFIG.rabbitmq.heartbeat, credentials=credentials
|
|
)
|
|
body = "Pika pika!"
|
|
produce_response(parameters, queue, body)
|