Commit c3f655ee authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Added cleanup intervall to config options

parent 783cfc91
......@@ -3,10 +3,9 @@
#########################################
# Path where the logfile will be created
#logfilePath = /space/projects/zeromq-data-transfer/logs
logfilePath = /home/kuhnm/Arbeit/zeromq-data-transfer/logs
logfilePath = /space/projects/zeromq-data-transfer/logs
#logfilePath = /home/kuhnm/Arbeit/zeromq-data-transfer/logs
#logfilePath = /home/p11user/zeromq-data-transfer/logs
#logfilePath = /home/p11user/live-viewer/logs
# Filename used for logging
logfileName = dataManager.log
......@@ -57,12 +56,13 @@ fixSubdirs = ["commissioning", "current", "local"]
# Directory to be monitor for changes
# Inside this directory only the subdirectories "commissioning", "current" and "local" are monitored
# (needed if eventDetector is InotifyxDetector or WatchdogDetector)
#monitoredDir = /space/projects/zeromq-data-transfer/data/source
monitoredDir = /home/kuhnm/Arbeit/zeromq-data-transfer/data/source
monitoredDir = /space/projects/zeromq-data-transfer/data/source
#monitoredDir = /home/kuhnm/Arbeit/zeromq-data-transfer/data/source
#monitoredDir = /rd
# Event type of files to be monitored (options are: IN_CLOSE_WRITE, IN_MOVED_TO, ...)
# (needed if eventDetector is InotifyxDetector or WatchdogDetector)
#monitoredEventType = SOME_STUPID_EVENT
monitoredEventType = IN_CLOSE_WRITE
#monitoredEventType = IN_MOVED_TO
# The formats to be monitored, files in an other format will be be neglected
......@@ -77,9 +77,12 @@ historySize = 0
# if some files were missed should be activated
# (needed if eventDetector is InotifyxDetector)
useCleanUp = False
# "Intervall time (in seconds) used for clean up
# (only needed if eventDetectorType is InotifyxDetector
actionTime = 150
# Time (in seconds) since last modification after which a file will be seen as closed
# (needed if eventDetector is WatchdogDetector)
# (needed if eventDetector is InotifyxDetector (for clean up) or WatchdogDetector)
timeTillClosed = 2
# ZMQ port to get events from
......@@ -129,8 +132,8 @@ chunkSize = 10485760 ; # = 1024*1024*10
routerPort = 50004
# Target to move the files into
#localTarget = /space/projects/zeromq-data-transfer/data/target
localTarget = /home/kuhnm/Arbeit/zeromq-data-transfer/data/target
localTarget = /space/projects/zeromq-data-transfer/data/target
#localTarget = /home/kuhnm/Arbeit/zeromq-data-transfer/data/target
#localTarget = /gpfs
# Flag describing if the data should be stored in localTarget
......
......@@ -113,11 +113,11 @@ def argumentParsing():
monitoredDir = config.get('asection', 'monitoredDir')
monitoredEventType = config.get('asection', 'monitoredEventType')
monitoredFormats = json.loads(config.get('asection', 'monitoredFormats'))
timeTillClosed = config.getfloat('asection', 'timeTillClosed')
# for InotifyxDetector:
historySize = config.getint('asection', 'historySize')
useCleanUp = config.getboolean('asection', 'useCleanUp')
# for WatchdogDetector:
timeTillClosed = config.getfloat('asection', 'timeTillClosed')
actionTime = config.getfloat('asection', 'actionTime')
# for ZmqDetector:
eventPort = config.get('asection', 'eventPort')
# for HttpGetDetector:
......@@ -159,11 +159,19 @@ def argumentParsing():
(needed if eventDetector is InotifyxDetector; default=" + str(useCleanUp) + ")",
default = useCleanUp )
parser.add_argument("--actionTime" , type = float,
help = "Intervall time (in seconds) used for clea nup \
(only needed if eventDetectorType is InotifyxDetector; default=" + str(actionTime) + ")",
default = actionTime )
parser.add_argument("--timeTillClosed" , type = float,
help = "Time (in seconds) since last modification after which a file will be seen as closed \
(only needed if eventDetectorType is WatchdogDetector; default=" + str(timeTillClosed) + ")",
(only needed if eventDetectorType is InotifyxDetector (for clean up) or WatchdogDetector; \
default=" + str(timeTillClosed) + ")",
default = timeTillClosed )
parser.add_argument("--eventPort" , type = str,
help = "ZMQ port to get events from \
(only needed if eventDetectorType is ZmqDetector; default=" + str(eventPort) + ")",
......@@ -407,8 +415,8 @@ class DataManager():
"timeout" : 1,
"historySize" : arguments.historySize,
"useCleanUp" : arguments.useCleanUp,
"cleanUpTime" : 5,
"actionTime" : 120
"cleanUpTime" : arguments.timeTillClosed,
"actionTime" : arguments.actionTime
}
elif arguments.eventDetectorType == "WatchdogDetector":
self.eventDetectorConfig = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment