diff --git a/SAS/TriggerServices/lib/config.py b/SAS/TriggerServices/lib/config.py index 99e285c75b6ab32f9ac35589760bc684adf16e8c..83cbaa76eda23f614cc89329e058848956c79ce5 100644 --- a/SAS/TriggerServices/lib/config.py +++ b/SAS/TriggerServices/lib/config.py @@ -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 diff --git a/SAS/TriggerServices/lib/trigger_service.py b/SAS/TriggerServices/lib/trigger_service.py index 73173bec04c9d93a2a800d05ffe058f2b2e2e7a0..052312d135ee935929047816ba5d7bde995c63c8 100644 --- a/SAS/TriggerServices/lib/trigger_service.py +++ b/SAS/TriggerServices/lib/trigger_service.py @@ -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()