Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
a21585b6
Commit
a21585b6
authored
6 years ago
by
Jörn Künsemöller
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TriggerServices/lib/config.py
+3
-1
3 additions, 1 deletion
SAS/TriggerServices/lib/config.py
SAS/TriggerServices/lib/trigger_service.py
+3
-2
3 additions, 2 deletions
SAS/TriggerServices/lib/trigger_service.py
with
6 additions
and
3 deletions
SAS/TriggerServices/lib/config.py
+
3
−
1
View file @
a21585b6
...
...
@@ -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
This diff is collapsed.
Click to expand it.
SAS/TriggerServices/lib/trigger_service.py
+
3
−
2
View file @
a21585b6
...
...
@@ -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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment