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

Task #8888: busname := lofar.ra.notification, service := OTDB.TaskSpecified

parent 983bd602
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__) ...@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__)
class RATaskSpecifiedBusListener(AbstractBusListener): class RATaskSpecifiedBusListener(AbstractBusListener):
def __init__(self, busname='lofar.ra', subject='TaskSpecified', broker=None, **kwargs): def __init__(self, busname='lofar.ra.notification', subject='OTDB.TaskSpecified', broker=None, **kwargs):
""" """
RATaskSpecifiedBusListener listens on the lofar ra message bus and calls (empty) on<SomeMessage> methods when such a message is received. RATaskSpecifiedBusListener listens on the lofar ra message bus and calls (empty) on<SomeMessage> methods when such a message is received.
Typical usage is to derive your own subclass from RATaskSpecifiedBusListener and implement the specific on<SomeMessage> methods that you are interested in. Typical usage is to derive your own subclass from RATaskSpecifiedBusListener and implement the specific on<SomeMessage> methods that you are interested in.
......
...@@ -230,9 +230,9 @@ if __name__ == "__main__": ...@@ -230,9 +230,9 @@ if __name__ == "__main__":
# Check the invocation arguments # Check the invocation arguments
parser = OptionParser("%prog -O otdb_bus -B my_bus [options]") parser = OptionParser("%prog -O otdb_bus -B my_bus [options]")
parser.add_option("-O", "--otdb_bus", dest="otdb_busname", type="string", default="lofar.otdb", parser.add_option("-O", "--otdb_bus", dest="otdb_busname", type="string", default="lofar.otdb.notification",
help="Bus or queue OTDB operates on") help="Bus or queue OTDB operates on")
parser.add_option("-B", "--my_bus", dest="my_busname", type="string", default="lofar.ra", parser.add_option("-B", "--my_bus", dest="my_busname", type="string", default="lofar.ra.notification",
help="Bus or queue we publish resource requests on") help="Bus or queue we publish resource requests on")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
...@@ -240,6 +240,6 @@ if __name__ == "__main__": ...@@ -240,6 +240,6 @@ if __name__ == "__main__":
parser.print_help() parser.print_help()
sys.exit(1) sys.exit(1)
with RATaskSpecified("TaskSpecified", otdb_busname=options.otdb_busname, my_busname=options.my_busname) as jts: with RATaskSpecified("OTDB.TaskSpecified", otdb_busname=options.otdb_busname, my_busname=options.my_busname) as jts:
waitForInterrupt() waitForInterrupt()
...@@ -25,7 +25,7 @@ Daemon that listens to OTDB status changes to PRESCHEDULED, requests ...@@ -25,7 +25,7 @@ Daemon that listens to OTDB status changes to PRESCHEDULED, requests
the parset of such jobs (+ their predecessors), and posts them on the bus. the parset of such jobs (+ their predecessors), and posts them on the bus.
""" """
from lofar.sas.resourceassignment.JobsToSchedule import JobsToScheduleService from lofar.sas.resourceassignment.RATaskSpecified import RATaskSpecified
if __name__ == "__main__": if __name__ == "__main__":
import sys import sys
...@@ -43,6 +43,6 @@ if __name__ == "__main__": ...@@ -43,6 +43,6 @@ if __name__ == "__main__":
parser.print_help() parser.print_help()
sys.exit(1) sys.exit(1)
with JobsToScheduleService("TaskSpecified", otdb_busname=options.otdb_busname, my_busname=options.my_busname) as jts: with RATaskSpecified("OTDB.TaskSpecified", otdb_busname=options.otdb_busname, my_busname=options.my_busname) as jts:
waitForInterrupt() waitForInterrupt()
[program:JobsToSchedule] [program:RATaskSpecified]
command=/bin/bash -c 'source $LOFARROOT/lofarinit.sh;rataskspecifiedservice --otdb_busname=lofar.otdb --my_busname=lofar.ra' command=/bin/bash -c 'source $LOFARROOT/lofarinit.sh;rataskspecifiedservice'
user=lofarsys user=lofarsys
stopsignal=INT ; KeyboardInterrupt stopsignal=INT ; KeyboardInterrupt
stopasgroup=true stopasgroup=true
......
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