Multiple error detection fixes
This commit is contained in:
parent
f607cd9ab2
commit
e834059721
|
@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.2-beta3
|
PROGRAM_VERSION=1.2-beta3
|
||||||
PROGRAM_BUILD=2016121102
|
PROGRAM_BUILD=2016121103
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
#TODO: update waitfor parallelexec and checkarguments
|
#TODO: update waitfor parallelexec and checkarguments
|
||||||
|
@ -1726,7 +1726,7 @@ if [ -d "$replicaDeletionPath" ]; then
|
||||||
else
|
else
|
||||||
echo "The $replicaType replica dir [$replicaDeletionPath] does not exist. Skipping cleaning of old files"
|
echo "The $replicaType replica dir [$replicaDeletionPath] does not exist. Skipping cleaning of old files"
|
||||||
fi
|
fi
|
||||||
return $((retval1 + retval2))
|
exit $((retval1 + retval2))
|
||||||
ENDSSH
|
ENDSSH
|
||||||
retval=$?
|
retval=$?
|
||||||
if [ $retval -ne 0 ]; then
|
if [ $retval -ne 0 ]; then
|
||||||
|
@ -2098,10 +2098,13 @@ function SyncOnChanges {
|
||||||
if [ $retval -eq 0 ]; then
|
if [ $retval -eq 0 ]; then
|
||||||
Logger "#### Changes detected, waiting $MIN_WAIT seconds before running next sync." "NOTICE"
|
Logger "#### Changes detected, waiting $MIN_WAIT seconds before running next sync." "NOTICE"
|
||||||
sleep $MIN_WAIT
|
sleep $MIN_WAIT
|
||||||
|
# inotifywait --timeout result is 2, WaitForTaskCompletion HardTimeout is 1
|
||||||
|
elif [ "$LOCAL_OS" == "MacOSX" ]; then
|
||||||
|
Logger "#### Changes or error detected, waiting $MIN_WAIT seconds before running next sync." "NOTICE"
|
||||||
elif [ $retval -eq 2 ]; then
|
elif [ $retval -eq 2 ]; then
|
||||||
Logger "#### $MAX_WAIT timeout reached, running sync." "NOTICE"
|
Logger "#### $MAX_WAIT timeout reached, running sync." "NOTICE"
|
||||||
else
|
elif [ $retval -eq 1 ]; then
|
||||||
Logger "#### inotify error detected, waiting $MIN_WAIT seconds before running next sync." "ERROR" $retval
|
Logger "#### inotify error detected, waiting $MIN_WAIT seconds before running next sync." "ERROR" $retval
|
||||||
sleep $MIN_WAIT
|
sleep $MIN_WAIT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue