mirror of
https://github.com/deajan/obackup.git
synced 2024-12-27 07:53:40 +01:00
Removed unused parameter in WaitFor function
This commit is contained in:
parent
db32308c40
commit
5c8eb7fdf9
@ -1,6 +1,6 @@
|
|||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||||
|
|
||||||
## FUNC_BUILD=2016081801
|
## FUNC_BUILD=2016081802
|
||||||
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## 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
|
## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode
|
||||||
@ -574,12 +574,11 @@ function WaitForTaskCompletion {
|
|||||||
local soft_max_time="${2}" # If program with pid $pid takes longer than $soft_max_time seconds, will log a warning, unless $soft_max_time equals 0.
|
local soft_max_time="${2}" # If program with pid $pid takes longer than $soft_max_time seconds, will log a warning, unless $soft_max_time equals 0.
|
||||||
local hard_max_time="${3}" # If program with pid $pid takes longer than $hard_max_time seconds, will stop execution, unless $hard_max_time equals 0.
|
local hard_max_time="${3}" # If program with pid $pid takes longer than $hard_max_time seconds, will stop execution, unless $hard_max_time equals 0.
|
||||||
local caller_name="${4}" # Who called this function
|
local caller_name="${4}" # Who called this function
|
||||||
local exit_on_error="${5:-false}" # Should the function exit on subprocess errors
|
local counting="${5:-true}" # Count time since function has been launched if true, since script has been launched if false
|
||||||
local counting="${6:-true}" # Count time since function launch if true, script launch if false
|
local keep_logging="${6:-0}" # Log a standby message every X seconds. Set to zero to disable logging
|
||||||
local keep_logging="${7:-0}" # Log a standby message every X seconds. Set to zero to disable logging
|
|
||||||
|
|
||||||
Logger "${FUNCNAME[0]} called by [$caller_name]." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
Logger "${FUNCNAME[0]} called by [$caller_name]." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
||||||
__CheckArguments 7 $# ${FUNCNAME[0]} "$@" #__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 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 log_ttime=0 # local time instance for comparaison
|
||||||
@ -666,12 +665,7 @@ function WaitForTaskCompletion {
|
|||||||
done
|
done
|
||||||
|
|
||||||
Logger "${FUNCNAME[0]} ended for [$caller_name] using [$pidCount] subprocesses with [$errorcount] errors." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
Logger "${FUNCNAME[0]} ended for [$caller_name] using [$pidCount] subprocesses with [$errorcount] errors." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG
|
||||||
if [ $exit_on_error == true ] && [ $errorcount -gt 0 ]; then
|
return $errorcount
|
||||||
Logger "Stopping execution." "CRITICAL"
|
|
||||||
exit 1337
|
|
||||||
else
|
|
||||||
return $errorcount
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CleanUp {
|
function CleanUp {
|
||||||
|
Loading…
Reference in New Issue
Block a user