From 134f570ac4e1f566b219e7f0da44f54b51f4d561 Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Thu, 25 Nov 2010 07:21:35 +0000 Subject: [PATCH] activated moves --- configure.ac | 2 +- lsyncd.lua | 17 +++++++++++------ tests/churn-rsync.lua | 2 +- tests/churn-rsyncssh.lua | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index e814f7b..92b1c4a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. #AC_PREREQ(2.60) -AC_INIT(lsyncd, 2.0beta2, axkibe@gmail.com) +AC_INIT(lsyncd, 2.0beta3, axkibe@gmail.com) AC_CONFIG_SRCDIR([lsyncd.c],[lsyncd.lua],[inotify.c]) AC_CONFIG_HEADER([config.h],[lsyncd.h]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) diff --git a/lsyncd.lua b/lsyncd.lua index 954650e..bfa6159 100644 --- a/lsyncd.lua +++ b/lsyncd.lua @@ -20,7 +20,7 @@ if lsyncd_version then "You cannot use the lsyncd runner as configuration file!") lsyncd.terminate(-1) -- ERRNO end -lsyncd_version = "2.0beta2" +lsyncd_version = "2.0beta3" ----- -- Hides the core interface from user scripts @@ -2599,16 +2599,16 @@ local default_rsyncssh = { -- Spawns rsync for a list of events -- action = function(inlet) - local event = inlet.getEvent() + local event, event2 = inlet.getEvent() local config = inlet.getConfig() -- makes move local on host if event.etype == 'Move' then - log("Normal", "Moving ",event.path," -> ",event.path2) + log("Normal", "Moving ",event.path," -> ",event2.path) spawn(event, "/usr/bin/ssh", config.host, "mv", config.targetdir .. event.path, - config.targetdir .. event.path2) + config.targetdir .. event2.path) return end @@ -2736,8 +2736,13 @@ local default_rsyncssh = { ----- -- allow several processes -- - maxProcesses = 1, - + maxProcesses = 3, + + ------ + -- Let the core not split move event. + -- + onMove = true, + ----- -- Default delay. -- diff --git a/tests/churn-rsync.lua b/tests/churn-rsync.lua index 915588e..f8de951 100755 --- a/tests/churn-rsync.lua +++ b/tests/churn-rsync.lua @@ -28,7 +28,7 @@ posix.sleep(1) churn(srcdir, 100) cwriteln("waiting for Lsyncd to finish its jobs.") -posix.sleep(20) +posix.sleep(30) cwriteln("killing the Lsyncd daemon") posix.kill(pid) diff --git a/tests/churn-rsyncssh.lua b/tests/churn-rsyncssh.lua index df417f5..166a25c 100755 --- a/tests/churn-rsyncssh.lua +++ b/tests/churn-rsyncssh.lua @@ -31,7 +31,7 @@ posix.sleep(1) churn(srcdir, 100) cwriteln("waiting for Lsyncd to finish its jobs.") -posix.sleep(20) +posix.sleep(30) cwriteln("killing the Lsyncd daemon") posix.kill(pid)