## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
@ -58,6 +58,8 @@ _OFUNCTIONS_BOOTSTRAP=true
## _LOGGER_ERR_ONLY=true/false
## _LOGGER_PREFIX="date"/"time"/""
#TODO: global WAIT_FOR_TASK_COMPLETION_id instead of callerName has to be backported to ParallelExec and osync / obackup / pmocr ocde
## Logger sets {ERROR|WARN}_ALERT variable when called with critical / error / warn loglevel
## When called from subprocesses, variable of main process can't be set. Status needs to be get via $RUN_DIR/$PROGRAM.Logger.{error|warn}.$SCRIPT_PID.$TSTAMP
@ -353,7 +355,7 @@ function KillChilds {
localself="${2:-false}"# Should parent be killed too ?
# Paranoid checks, we can safely assume that $pid shouldn't be 0 nor 1
if[$log_ttime -ne $exec_time];then# Fix when sleep time lower than 1s
log_ttime=$exec_time
Logger "Current tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
Logger "There are $((commandCount-counter-numberOfProcess)) / $commandCount in the task queue. Currently, $numberofProcess tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
fi
fi
@ -2795,8 +2798,14 @@ function HandleLocks {
local retval
local pids
local initiatorPid
local targetPid
localoverwrite=false
# Assume lock files are created successfully unless stated otherwise
## BEGIN Generic bash functions written in 2013-2017 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
@ -29,6 +29,8 @@ _OFUNCTIONS_BOOTSTRAP=true
## _LOGGER_ERR_ONLY=true/false
## _LOGGER_PREFIX="date"/"time"/""
#TODO: global WAIT_FOR_TASK_COMPLETION_id instead of callerName has to be backported to ParallelExec and osync / obackup / pmocr ocde
## Logger sets {ERROR|WARN}_ALERT variable when called with critical / error / warn loglevel
## When called from subprocesses, variable of main process can't be set. Status needs to be get via $RUN_DIR/$PROGRAM.Logger.{error|warn}.$SCRIPT_PID.$TSTAMP
@ -309,7 +311,7 @@ function KillChilds {
localself="${2:-false}"# Should parent be killed too ?
# Paranoid checks, we can safely assume that $pid shouldn't be 0 nor 1
if[$log_ttime -ne $exec_time];then# Fix when sleep time lower than 1s
log_ttime=$exec_time
Logger "Current tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
Logger "There are $((commandCount-counter-numberOfProcess)) / $commandCount in the task queue. Currently, $numberofProcess tasks still running with pids [$(joinString , ${pidsArray[@]})].""NOTICE"
fi
fi
fi
@ -2610,8 +2613,14 @@ function HandleLocks {
local retval
local pids
local initiatorPid
local targetPid
localoverwrite=false
# Assume lock files are created successfully unless stated otherwise