From 1e1adf3470ddc2320beda8609d3617a7d22f9aac Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 22 Aug 2016 08:29:58 +0200 Subject: [PATCH] Fixed code removal --- dev/ofunctions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index e194a65..2d0a4fc 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -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 @@ -618,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