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
fbd4daa5
Commit
fbd4daa5
authored
4 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-566
: fixes for the feedbackservice
parent
1439ee0b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!314
Resolve TMSS-566
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/services/feedback_handling/lib/feedback_handling.py
+19
-4
19 additions, 4 deletions
SAS/TMSS/services/feedback_handling/lib/feedback_handling.py
with
19 additions
and
4 deletions
SAS/TMSS/services/feedback_handling/lib/feedback_handling.py
+
19
−
4
View file @
fbd4daa5
...
...
@@ -70,12 +70,25 @@ class TMSSFeedbackListener:
try
:
# get message from messagebus
msg
=
fbus
.
get
(
1
)
# add contained feedback to TMSS
self
.
append_feedback_to_tmss_subtask_raw_feedback
(
msg
.
momid
,
msg
.
payload
)
# try processing it, which will will fail until feedback of the subtask is complete.
self
.
process_subtask_feedback_and_set_finished
(
msg
.
momid
)
if
msg
is
not
None
:
# note: cobalt/rtcp creates feedback and assumes that the observationID has its origin in OTDB.
# hence, it stores this id in the 'sasid' property of the message.
# We know that TMSS sets its subtask_id in the parset in the Observation.ObsID field,
# so we can fetch the TMSS subtask_id from the msg's sasid.
tmss_subtask_id
=
msg
.
sasid
logger
.
info
(
"
received feedback from bus=
'
%s
'
for TMSS subtask id=%s payload=%s
"
,
ex
,
tmss_subtask_id
,
msg
.
payload
)
# add contained feedback to TMSS
self
.
append_feedback_to_tmss_subtask_raw_feedback
(
tmss_subtask_id
,
msg
.
payload
)
# try processing it, which will will fail until feedback of the subtask is complete.
self
.
process_subtask_feedback_and_set_finished
(
tmss_subtask_id
)
except
TimeoutError
:
pass
except
Exception
as
e
:
logger
.
error
(
str
(
e
))
logger
.
info
(
'
Stopped listening on exchange=%s broker=%s
'
%
(
ex
,
broker_feedback
))
for
exchange
in
self
.
exchanges
:
...
...
@@ -90,6 +103,8 @@ class TMSSFeedbackListener:
thread
.
join
(
5
)
def
main
():
logging
.
basicConfig
(
format
=
'
%(asctime)s %(levelname)s %(message)s
'
,
level
=
logging
.
INFO
)
from
lofar.common.util
import
waitForInterrupt
with
TMSSFeedbackListener
():
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