This commit is contained in:
parent
a97d081bff
commit
a3d3b27817
@ -42,8 +42,8 @@ def setup_rabbit(mqtt_: MQTT) -> None:
|
|||||||
credentials = pika.PlainCredentials(config.RABBIT_USERNAME, config.RABBIT_PASSWORD)
|
credentials = pika.PlainCredentials(config.RABBIT_USERNAME, config.RABBIT_PASSWORD)
|
||||||
connection = pika.BlockingConnection(pika.ConnectionParameters(host=config.RABBIT_HOSTNAME,
|
connection = pika.BlockingConnection(pika.ConnectionParameters(host=config.RABBIT_HOSTNAME,
|
||||||
credentials=credentials,
|
credentials=credentials,
|
||||||
heartbeat=10,
|
heartbeat=30,
|
||||||
socket_timeout=5))
|
socket_timeout=45))
|
||||||
channel = connection.channel()
|
channel = connection.channel()
|
||||||
channel.exchange_declare(exchange=config.RABBIT_EXCHANGE,
|
channel.exchange_declare(exchange=config.RABBIT_EXCHANGE,
|
||||||
exchange_type='fanout')
|
exchange_type='fanout')
|
||||||
|
Loading…
Reference in New Issue
Block a user