Skip to content
Snippets Groups Projects
Commit a21585b6 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

Task SW-539: Make ALERT broker connection configurable through config.py

parent 115f8390
No related branches found
No related tags found
No related merge requests found
......@@ -30,4 +30,6 @@ OTDB_NOTIFICATION_SUBJECT = 'TaskStatus'
# VO-Events
# todo
\ No newline at end of file
ALERT_BROKER_HOST = '127.0.0.1'
ALERT_BROKER_PORT = 8099
ALERT_PACKET_TYPE_FILTER = None # list of int or None for all
......@@ -38,7 +38,8 @@ from config import MOMQUERY_BUSNAME, MOMQUERY_SERVICENAME, \
VALIDATION_BUSNAME, VALIDATION_SERVICENAME, \
SPECIFICATIONTRANSLATION_BUSNAME, SPECIFICATIONTRANSLATION_SERVICENAME, \
TRIGGER_SERVICENAME, TRIGGER_BUSNAME, \
TRIGGER_ADDITION_NOTIFICATION_BUSNAME, TRIGGER_ADDITION_NOTIFICATION_SUBJECT
TRIGGER_ADDITION_NOTIFICATION_BUSNAME, TRIGGER_ADDITION_NOTIFICATION_SUBJECT, \
ALERT_BROKER_HOST, ALERT_BROKER_PORT, ALERT_PACKET_TYPE_FILTER
from lofar.triggerservices.voevent_listener import VOEventListenerInterface
......@@ -392,7 +393,7 @@ def main():
with create_service():
# handle vo events
# todo: configure broker host/port and filter_for Package_Type integer as provided for ALERT
alert_handler = ALERTHandler(broker_host='127.0.0.1', broker_port=8099, filter_for=None)
alert_handler = ALERTHandler(broker_host=ALERT_BROKER_HOST, broker_port=ALERT_BROKER_PORT, filter_for=ALERT_PACKET_TYPE_FILTER)
alert_handler.start_listening()
waitForInterrupt()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment