From 5f737188cbd2f096b4b74fbbc62580086e20dde2 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <manuela.kuhn@desy.de> Date: Tue, 28 Jul 2015 12:42:34 +0200 Subject: [PATCH] ZMQ only gets triggered by onModify Events --- lsyncd.conf | 76 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/lsyncd.conf b/lsyncd.conf index 514892df..01c711db 100644 --- a/lsyncd.conf +++ b/lsyncd.conf @@ -20,42 +20,42 @@ 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/wrapper_script.py', - '--mv_source', - event.sourcePath, - '--mv_target', - event.targetPathdir - ) +-- 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/wrapper_script.py', +-- '--mv_source', +-- event.sourcePath, +-- '--mv_target', +-- event.targetPathdir +-- ) -- spawn( -- event, @@ -63,8 +63,8 @@ gpfs = { -- event.sourcePath, -- event.targetPathdir -- ) - end - end, +-- end +-- end, onModify = function(event) if event.isdir then -- GitLab