Skip to content
Snippets Groups Projects
Commit 1538aefc authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8437: Do not send status twice when using runPipeline.sh

parent 2b7e1e57
Branches
Tags
No related merge requests found
...@@ -93,7 +93,7 @@ class control(StatefulRecipe): ...@@ -93,7 +93,7 @@ class control(StatefulRecipe):
indicates failure. indicates failure.
""" """
if self.feedback_method == "messagebus": if self.feedback_method == "messagebus" and self.feedback_send_status:
bus = messagebus.ToBus("lofar.task.feedback.state") bus = messagebus.ToBus("lofar.task.feedback.state")
msg = TaskFeedbackState( msg = TaskFeedbackState(
"lofarpipe.support.control", "lofarpipe.support.control",
...@@ -134,6 +134,11 @@ class control(StatefulRecipe): ...@@ -134,6 +134,11 @@ class control(StatefulRecipe):
except: except:
self.feedback_method = "messagebus" self.feedback_method = "messagebus"
try:
self.feedbacK_send_status = self.config.getboolean('feedback', 'send_status')
except:
self.feedback_send_status = True
if self.feedback_method == "messagebus" and not messagebus.MESSAGING_ENABLED: if self.feedback_method == "messagebus" and not messagebus.MESSAGING_ENABLED:
self.logger.error("Feedback over messagebus requested, but messagebus support is not enabled or functional") self.logger.error("Feedback over messagebus requested, but messagebus support is not enabled or functional")
return 1 return 1
......
...@@ -35,6 +35,9 @@ xml_stat_file = %(runtime_directory)s/%(job_name)s/logs/%(start_time)s/statistic ...@@ -35,6 +35,9 @@ xml_stat_file = %(runtime_directory)s/%(job_name)s/logs/%(start_time)s/statistic
# none Do NOT send feedback and status # none Do NOT send feedback and status
method = messagebus method = messagebus
# Report final state on the message bus? (yes for CEP2 using "startPython.sh", no for CEP4 using "runPipeline.sh")
send_status = no
[remote] [remote]
method = custom_cmdline method = custom_cmdline
globalfs = yes globalfs = yes
......
...@@ -44,7 +44,7 @@ The execution chains are as follows: ...@@ -44,7 +44,7 @@ The execution chains are as follows:
(runPipeline.sh) -> Calls (runPipeline.sh) -> Calls
- state <- [ACTIVE] - state <- [ACTIVE]
- getParset - getParset
- (run pipeline) (which, for CEP2 compatibility, still calls state <- [FINISHED/ABORTED]) - (run pipeline)
- state <- [COMPLETING] - state <- [COMPLETING]
- (wrap up) - (wrap up)
- state <- [FINISHED] - state <- [FINISHED]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment