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
3e558d08
Commit
3e558d08
authored
5 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
SW-699
: Remove notification subject override
parent
1e723f5d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
QA/QA_Service/lib/qa_service.py
+1
-9
1 addition, 9 deletions
QA/QA_Service/lib/qa_service.py
with
1 addition
and
9 deletions
QA/QA_Service/lib/qa_service.py
+
1
−
9
View file @
3e558d08
...
@@ -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
()
...
...
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