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
cdd61db1
Commit
cdd61db1
authored
3 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-1522
: wrap in BusListenerJanitor to auto-delete queue upon exit
parent
077aeb29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!736
TMSS-1377 & TMSS-1376: TMSS-adapted TBB scripts and gitlab/docker TBB builds
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CEP/TBB/TBBdatawriter/TBBTMSSBusListener.py
+4
-1
4 additions, 1 deletion
CEP/TBB/TBBdatawriter/TBBTMSSBusListener.py
with
4 additions
and
1 deletion
CEP/TBB/TBBdatawriter/TBBTMSSBusListener.py
+
4
−
1
View file @
cdd61db1
#!/usr/bin/env python
#!/usr/bin/env python
from
lofar.messaging.messagebus
import
BusListenerJanitor
from
lofar.sas.tmss.client.tmssbuslistener
import
TMSSBusListener
,
TMSSEventMessageHandler
from
lofar.sas.tmss.client.tmssbuslistener
import
TMSSBusListener
,
TMSSEventMessageHandler
from
lofar.sas.tmss.client.tmss_http_rest_client
import
TMSSsession
from
lofar.sas.tmss.client.tmss_http_rest_client
import
TMSSsession
from
lofar.common.util
import
waitForInterrupt
from
lofar.common.util
import
waitForInterrupt
...
@@ -188,7 +189,9 @@ def main():
...
@@ -188,7 +189,9 @@ def main():
else
:
else
:
print
(
"
No observation running, waiting for next observation
"
)
print
(
"
No observation running, waiting for next observation
"
)
with
TMSSBusListener
(
handler_type
=
TBBTMSSEventMessageHandler
,
num_threads
=
1
):
# run TMSSBusListener with TBBTMSSEventMessageHandler
# wrap in BusListenerJanitor to auto-delete queue upon exit
with
BusListenerJanitor
(
TMSSBusListener
(
handler_type
=
TBBTMSSEventMessageHandler
,
num_threads
=
1
)):
waitForInterrupt
()
waitForInterrupt
()
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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