auto delete queue
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-07-30 15:39:02 +02:00
parent fc80c1cbe2
commit fd22ec57eb
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -45,7 +45,7 @@ def setup_rabbit() -> None:
exchange_type='fanout', exchange_type='fanout',
durable=True, durable=True,
auto_delete=False) auto_delete=False)
queue = channel.queue_declare(durable=True, auto_delete=False, queue=uuid.uuid4().urn.split(':')[2], queue = channel.queue_declare(durable=True, auto_delete=True, queue=uuid.uuid4().urn.split(':')[2],
exclusive=True).method.queue exclusive=True).method.queue
channel.queue_bind(exchange=config.RABBIT_EXCHANGE, queue=queue) channel.queue_bind(exchange=config.RABBIT_EXCHANGE, queue=queue)
channel.basic_consume(queue=queue, on_message_callback=on_message, auto_ack=True) channel.basic_consume(queue=queue, on_message_callback=on_message, auto_ack=True)