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

SW-699: Remove use of subject in ToBus constructor, as it will silently...

SW-699: Remove use of subject in ToBus constructor, as it will silently overwrite the subject of messages sent through it
parent 60327de7
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,8 @@ class RATaskSpecified(OTDBBusListener):
self.otdbrpc = OTDBRPC(busname=busname, broker=broker) ## , ForwardExceptions=True hardcoded in RPCWrapper right now
self.radbrpc = RARPC(busname=busname, broker=broker) ## , ForwardExceptions=True hardcoded in RPCWrapper right now
self.momrpc = MoMQueryRPC(busname=busname, broker=broker, timeout=180)
self.send_bus = ToBus(address=busname, subject=DEFAULT_RA_TASK_SPECIFIED_NOTIFICATION_SUBJECT)
self.notification_subject = DEFAULT_RA_TASK_SPECIFIED_NOTIFICATION_SUBJECT
self.send_bus = ToBus(address=busname)
def start_listening(self, **kwargs):
self.otdbrpc.open()
......@@ -86,7 +87,7 @@ class RATaskSpecified(OTDBBusListener):
if spec.status == status:
logger.info("Sending result: %s" % resultTree)
# Put result on bus
msg = EventMessage(content=resultTree)
msg = EventMessage(context=self.notification_subject, content=resultTree)
self.send_bus.send(msg)
logger.info("Result sent")
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment