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

SW-699: Remove notification subject override

parent 1e723f5d
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ from optparse import OptionParser, OptionGroup ...@@ -24,7 +24,6 @@ from optparse import OptionParser, OptionGroup
from threading import Thread from threading import Thread
from lofar.common.util import waitForInterrupt from lofar.common.util import waitForInterrupt
from lofar.sas.otdb.OTDBBusListener import OTDBBusListener from lofar.sas.otdb.OTDBBusListener import OTDBBusListener
from lofar.sas.otdb.config import DEFAULT_OTDB_NOTIFICATION_SUBJECT
from lofar.messaging.messagebus import ToBus from lofar.messaging.messagebus import ToBus
from lofar.messaging.messages import EventMessage from lofar.messaging.messages import EventMessage
from lofar.messaging import DEFAULT_BROKER, DEFAULT_BUSNAME from lofar.messaging import DEFAULT_BROKER, DEFAULT_BUSNAME
...@@ -43,8 +42,6 @@ class QAService(OTDBBusListener): ...@@ -43,8 +42,6 @@ class QAService(OTDBBusListener):
''' '''
def __init__(self, def __init__(self,
busname=DEFAULT_BUSNAME, busname=DEFAULT_BUSNAME,
qa_notification_subject_prefix=DEFAULT_QA_NOTIFICATION_SUBJECT_PREFIX,
otdb_notification_subject=DEFAULT_OTDB_NOTIFICATION_SUBJECT,
broker=DEFAULT_BROKER, broker=DEFAULT_BROKER,
qa_base_dir = '/data/qa', qa_base_dir = '/data/qa',
**kwargs): **kwargs):
...@@ -57,11 +54,10 @@ class QAService(OTDBBusListener): ...@@ -57,11 +54,10 @@ class QAService(OTDBBusListener):
:param broker: valid Qpid broker host (default: None, which means localhost) :param broker: valid Qpid broker host (default: None, which means localhost)
""" """
super(QAService, self).__init__(busname=busname, super(QAService, self).__init__(busname=busname,
subject=otdb_notification_subject,
broker=broker, broker=broker,
**kwargs) **kwargs)
self._qa_notification_subject_prefix = qa_notification_subject_prefix self._qa_notification_subject_prefix = DEFAULT_QA_NOTIFICATION_SUBJECT_PREFIX
self._send_bus = ToBus(address=busname, broker=broker) self._send_bus = ToBus(address=busname, broker=broker)
self.qa_base_dir = qa_base_dir self.qa_base_dir = qa_base_dir
self._unfinished_otdb_id_map = {} self._unfinished_otdb_id_map = {}
...@@ -291,9 +287,6 @@ def main(): ...@@ -291,9 +287,6 @@ def main():
group.add_option("--busname", dest="busname", type="string", group.add_option("--busname", dest="busname", type="string",
default=DEFAULT_BUSNAME, default=DEFAULT_BUSNAME,
help="Bus or queue where the OTDB notifications are published. [default: %default]") help="Bus or queue where the OTDB notifications are published. [default: %default]")
group.add_option("--otdb_notification_subject", dest="otdb_notification_subject", type="string",
default=DEFAULT_OTDB_NOTIFICATION_SUBJECT,
help="Subject of OTDB notifications on otdb_notification_busname. [default: %default]")
parser.add_option_group(group) parser.add_option_group(group)
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
...@@ -302,7 +295,6 @@ def main(): ...@@ -302,7 +295,6 @@ def main():
#start the qa service #start the qa service
with QAService(busname=options.busname, with QAService(busname=options.busname,
otdb_notification_subject=options.otdb_notification_subject,
broker=options.broker) as service: broker=options.broker) as service:
#loop and wait for messages or interrupt. #loop and wait for messages or interrupt.
waitForInterrupt() waitForInterrupt()
......
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