mirror of
https://github.com/deajan/obackup.git
synced 2024-12-25 15:03:41 +01:00
Fixed double error count in WaitForTaskCompletion
This commit is contained in:
parent
af9924a648
commit
69b41e01dd
@ -1,6 +1,6 @@
|
|||||||
#### MINIMAL-FUNCTION-SET BEGIN ####
|
#### MINIMAL-FUNCTION-SET BEGIN ####
|
||||||
|
|
||||||
## FUNC_BUILD=2016090301
|
## FUNC_BUILD=2016090401
|
||||||
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
|
||||||
|
|
||||||
## To use in a program, define the following variables:
|
## To use in a program, define the following variables:
|
||||||
@ -675,7 +675,7 @@ function WaitForTaskCompletion {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
SendAlert true
|
SendAlert true
|
||||||
errorcount=$((errorcount+1))
|
#errorcount=$((errorcount+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ function ParallelExec {
|
|||||||
local pidsArray
|
local pidsArray
|
||||||
local newPidsArray
|
local newPidsArray
|
||||||
local retval
|
local retval
|
||||||
local retvalAll=0
|
local errorCount=0
|
||||||
local pidState
|
local pidState
|
||||||
local commandsArrayPid
|
local commandsArrayPid
|
||||||
|
|
||||||
@ -774,7 +774,7 @@ function ParallelExec {
|
|||||||
retval=$?
|
retval=$?
|
||||||
if [ $retval -ne 0 ]; then
|
if [ $retval -ne 0 ]; then
|
||||||
Logger "Command [${commandsArrayPid[$pid]}] failed with exit code [$retval]." "ERROR"
|
Logger "Command [${commandsArrayPid[$pid]}] failed with exit code [$retval]." "ERROR"
|
||||||
retvalAll=$((retvalAll+1))
|
errorCount=$((errorCount+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
hasPids=true ##__WITH_PARANOIA_DEBUG
|
hasPids=true ##__WITH_PARANOIA_DEBUG
|
||||||
@ -790,7 +790,7 @@ function ParallelExec {
|
|||||||
sleep $SLEEP_TIME
|
sleep $SLEEP_TIME
|
||||||
done
|
done
|
||||||
|
|
||||||
return $retvalAll
|
return $errorCount
|
||||||
}
|
}
|
||||||
|
|
||||||
function CleanUp {
|
function CleanUp {
|
||||||
|
Loading…
Reference in New Issue
Block a user