From cb64c49092b53a72a1154442ab1d4466bac6468e Mon Sep 17 00:00:00 2001 From: agatha Date: Wed, 12 Jun 2024 22:00:21 -0400 Subject: [PATCH] use env var for rabbitmq host --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 463754e..e8555d4 100644 --- a/src/main.py +++ b/src/main.py @@ -1,4 +1,5 @@ import asyncio +import os import sys import threading from queue import Queue @@ -28,7 +29,7 @@ async def main(): monitor_thread.start() # RabbitMQ - host = 'localhost' + host = os.getenv("RABBITMQ_HOST", "localhost") port = 5672 exchange = 'matrix_alerts' producer = RabbitMQProducer(host=host, port=port, exchange=exchange)