Skip to content
Snippets Groups Projects
Commit 88f4aad7 authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Distinguished protocol usage: Windows tcp, Linux ipc

parent 3ee93818
No related branches found
No related tags found
No related merge requests found
......@@ -28,10 +28,13 @@ whitelist = ["localhost", "zitpcx19282", "zitpcx22614", "lsdma-lab04",
# ZMQ port to get new requests
requestPort = 50001
# ZMQ port to forward requests
# (needed if running on Windows)
requestFwPort = 50002
# ZMQ port to disribute control signals
# (needed if running on Windows)
controlPort = 50005
#########################################
......@@ -71,7 +74,8 @@ historySize = 0
# (needed if eventDetector is WatchdogDetector)
timeTillClosed = 2
# ZMQ port to get events from (only needed if eventDetectorType is ZmqDetector)
# ZMQ port to get events from
# (needed if eventDetectorType is ZmqDetector)
eventPort = 50003
# Tango device proxy for the detector
......@@ -94,9 +98,9 @@ dataFetcherType = getFromFile
#dataFetcherType = getFromHttp
# If "getFromZmq" is specified as dataFetcherType it needs a port to listen to
# (needed if eventDetectorType is ZmqDetector)
dataFetcherPort = 50010
# Number of parallel data streams
# if this number is modifified, the port numbers also have to be adjusted
numberOfStreams = 1
......@@ -113,6 +117,7 @@ chunkSize = 10485760 ; # = 1024*1024*10
#chunkSize = 1073741824 ; # = 1024*1024*1024
# ZMQ-router port which coordinates the load-balancing to the worker-processes
# (needed if running on Windows)
routerPort = 50004
# Target to move the files into
......
......@@ -276,6 +276,8 @@ class DataManager():
verbose = arguments.verbose
onScreen = arguments.onScreen
self.currentPID = os.getpid()
self.extLogQueue = False
if logQueue:
......@@ -303,7 +305,7 @@ class DataManager():
# Create log and set handler to queue handle
self.log = self.getLogger(self.logQueue)
self.log.info("DataManager started (PID " + str(os.getpid()) + ").")
self.log.info("DataManager started (PID " + str(self.currentPID) + ").")
signal.signal(signal.SIGTERM, self.signal_term_handler)
......@@ -316,11 +318,20 @@ class DataManager():
self.requestFwPort = arguments.requestFwPort
self.routerPort = arguments.routerPort
self.controlConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.controlPort)
self.comConId = "tcp://{ip}:{port}".format(ip=self.extIp, port=arguments.comPort)
self.requestFwConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.requestFwPort)
self.requestConId = "tcp://{ip}:{port}".format(ip=self.extIp, port=arguments.requestPort)
self.routerConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.routerPort)
if helpers.isWindows():
self.log.info("Using tcp for internal communication.")
self.controlConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.controlPort)
self.requestFwConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.requestFwPort)
self.routerConId = "tcp://{ip}:{port}".format(ip=self.localhost, port=arguments.routerPort)
else:
self.log.info("Using ipc for internal communication.")
self.controlConId = "ipc://{pid}_{id}".format(pid=self.currentPID, id="control")
self.requestFwConId = "ipc://{pid}_{id}".format(pid=self.currentPID, id="requestFw")
self.routerConId = "ipc://{pid}_{id}".format(pid=self.currentPID, id="router")
self.whitelist = arguments.whitelist
......
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