use env var for rabbitmq host

This commit is contained in:
agatha 2024-06-12 22:00:21 -04:00
parent 488f173176
commit cb64c49092

View File

@ -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)