From bcbd43fafb953befd00da95d4ed6680e07c31263 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 22 Aug 2016 08:31:48 +0200 Subject: [PATCH] Fixed code removal --- dev/ofunctions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 92e9069..1c467b0 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,6 +1,6 @@ #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016082202 +## FUNC_BUILD=2016082204 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -580,6 +580,7 @@ function WaitForTaskCompletion { Logger "${FUNCNAME[0]} called by [$caller_name]." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG __CheckArguments 6 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG + local soft_alert=0 # Does a soft alert need to be triggered, if yes, send an alert once local log_ttime=0 # local time instance for comparaison local seconds_begin=$SECONDS # Seconds since the beginning of the script @@ -597,7 +598,6 @@ function WaitForTaskCompletion { WAIT_FOR_TASK_COMPLETION="" while [ ${#pidsArray[@]} -gt 0 ]; do - Logger "Hey hey ${#pidsArray[@]} is $(joinString , ${pidsArray[@]})" "WARN" newPidsArray=() Spinner @@ -619,6 +619,7 @@ function WaitForTaskCompletion { if [ $exec_time -gt $soft_max_time ]; then if [ $soft_alert -eq 0 ] && [ $soft_max_time -ne 0 ]; then Logger "Max soft execution time exceeded for task [$caller_name] with pids [$(joinString , ${pidsArray[@]})]." "WARN" + soft_alert=1 SendAlert fi