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

Removed old unnecessary scripts

parent 8eabac9e
No related branches found
No related tags found
No related merge requests found
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- gpfs-direct
--
-- A (Layer 2) configuration.
--
-- Author: Jan Meyer <jan.meyer@desy.de>
--
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- configuration parameters
--
settings {
statusFile = "/space/projects/live-viewer/lsyncd.stat",
statusInterval = 1,
nodaemon = true
}
local formats = { jpg = true, tif = true, cbf = true, log = true }
local folders = { "/local", "/current/raw", "/commissioning/raw" }
gpfs = {
-- maxProcesses = 50,
onCreate = function(event)
-- check if in relevant subfolder
local location = false
for i, path in ipairs(folders) do
if string.sub(event.path, 1, string.len(path)) == path then
location = true
break
end
end
if location == false then return end
if event.isdir then
for i, path in ipairs(folders) do
if path == event.pathname then return end
end
spawn(
event,
'/bin/mkdir',
event.targetPath
)
else
-- check filetype
local extension = string.match(event.name, ".*%.([^.]+)$")
if formats[extension] ~= true then return end
spawn (
event,
'/usr/bin/python',
'/space/projects/live-viewer/ZeroMQTunnel/wrapper_script.py',
'--mv_source',
event.sourcePath,
'--mv_target',
event.targetPathdir
)
-- spawn(
-- event,
-- '/bin/mv',
-- event.sourcePath,
-- event.targetPathdir
-- )
end
end,
onModify = function(event)
if event.isdir then
error("Do not know how to handle 'Modify' on dirs")
else
-- check if in relevant subfolder
local location = false
for i, path in ipairs(folders) do
if string.sub(event.path, 1, string.len(path)) == path then
location = true
break
end
end
if location == false then return end
-- check filetype
local extension = string.match(event.name, ".*%.([^.]+)$")
if formats[extension] ~= true then return end
spawn (
event,
'/usr/bin/python',
'/space/projects/live-viewer/ZeroMQTunnel/wrapper_script.py',
'--mv_source',
event.sourcePath,
'--mv_target',
event.targetPathdir
)
-- spawn(
-- event,
-- '/bin/mv',
-- event.sourcePath,
-- event.targetPathdir
-- )
end
end,
--
-- Called when collecting a finished child process
--
collect = function(agent, exitcode)
local config = agent.config
if not agent.isList and agent.etype == "Blanket" then
if exitcode == 0 then
log("Normal", "Startup of '",agent.source,"' finished.")
elseif config.exitcodes and
config.exitcodes[exitcode] == "again"
then
log("Normal", "Retrying startup of '",agent.source,"'.")
return "again"
else
log("Error", "Failure on startup of '",agent.source,"'.")
end
return
end
local rc = config.exitcodes and config.exitcodes[exitcode]
if rc == "die" then
return rc
end
if agent.isList then
if rc == "again" then
log("Normal", "Retrying a list on exitcode = ",exitcode)
else
log("Normal", "Finished a list = ",exitcode)
end
else
if rc == "again" then
log("Normal", "Retrying ", agent.etype, " on ", agent.sourcePath, " = ", exitcode)
else
log("Normal", "Finished ", agent.etype, " on ", agent.sourcePath, " = ", exitcode)
end
end
return rc
end,
}
sync {
gpfs,
delay=0,
init=false,
source="/space/projects/live-viewer/source",
target="/space/projects/live-viewer/target",
}
#/bin/sh
BASE_DIR="/space/projects/live-viewer"
python ../src/ZeroMQTunnel/receiver.py --targetDir "${BASE_DIR}/data/zmq_target" --dataStreamIp "*" --logfilePath "${BASE_DIR}/logs" --logfileName "receiver.log" --maxRingBufferSize 10 --verbose
#/bin/sh
BASE_DIR="/space/projects/live-viewer"
#python ../src/ZeroMQTunnel/sender.py --logfilePath="${BASE_DIR}/logs" --parallelDataStreams 16 --dataStreamIp="131.169.185.34" --dataStreamPort="6061" --cleanerTargetPath="${BASE_DIR}/data/target/" --verbose
python ../src/ZeroMQTunnel/sender.py --logfilePath="${BASE_DIR}/logs" --parallelDataStreams 1 --dataStreamIp="127.0.0.1" --cleanerTargetPath="${BASE_DIR}/data/target" --verbose
#/bin/sh
python ../src/ZeroMQTunnel/with_lsyncd/fileMover_lsyncd.py --logfilePath="/space/projects/live-viewer/logs" --bindingIpForSocket="127.0.0.1" --logfileName="fileMover.log" --parallelDataStreams 1 --dataStreamIp="127.0.0.1" --dataStreamPort="6061" --verbose
#/bin/sh
python ../src/ZeroMQTunnel/with_lsyncd/receiver.py --outputDir /space/projects/live-viewer/data/zmq_target --tcpPortDataStream 6061 --bindingIpForDataStream 127.0.01 --logfile ../logs/receiver.log --verbose
#/bin/sh
python ../src/ZeroMQTunnel/with_lsyncd/watcher_lsyncd.py --watchFolder /space/projects/live-viewer/data/source/ --logfilePath /space/projects/live-viewer/logs
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