test new sleep. just racing
This commit is contained in:
parent
0ff74e42a7
commit
3e0ad6d18e
@ -41,7 +41,7 @@ do
|
|||||||
do
|
do
|
||||||
update_apps "${array[$it]}" &
|
update_apps "${array[$it]}" &
|
||||||
processes+=($!)
|
processes+=($!)
|
||||||
sleep 1.5
|
# sleep 1.5
|
||||||
((it++))
|
((it++))
|
||||||
((proc_count++))
|
((proc_count++))
|
||||||
done
|
done
|
||||||
@ -174,21 +174,21 @@ if [[ $rollback == "true" || "$startstatus" == "STOPPED" ]]; then
|
|||||||
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
|
status=$( grep "^$app_name," temp.txt | awk -F ',' '{print $2}')
|
||||||
if [[ "$status" == "ACTIVE" ]]; then
|
if [[ "$status" == "ACTIVE" ]]; then
|
||||||
if [[ "$startstatus" == "STOPPED" ]]; then
|
if [[ "$startstatus" == "STOPPED" ]]; then
|
||||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||||
[[ "$verbose" == "true" ]] && echo_array+=("Returing to STOPPED state..")
|
[[ "$verbose" == "true" ]] && echo_array+=("Returing to STOPPED state..")
|
||||||
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null || { echo_array+=("Error: Failed to stop $app_name") ; break ; }
|
midclt call chart.release.scale "$app_name" '{"replica_count": 0}' &> /dev/null || { echo_array+=("Error: Failed to stop $app_name") ; break ; }
|
||||||
echo_array+=("Stopped")
|
echo_array+=("Stopped")
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Active..") && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 15 && continue #if reports active on FIRST time through loop, double check
|
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports active on FIRST time through loop, double check
|
||||||
echo_array+=("Active")
|
echo_array+=("Active")
|
||||||
break #if reports active any time after the first loop, assume actually active.
|
break #if reports active any time after the first loop, assume actually active.
|
||||||
fi
|
fi
|
||||||
elif [[ "$status" == "STOPPED" ]]; then
|
elif [[ "$status" == "STOPPED" ]]; then
|
||||||
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Stopped..") && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
[[ "$count" -le 1 && "$verbose" == "true" ]] && echo_array+=("Verifying Stopped..") && sleep 10 && continue #if reports stopped on FIRST time through loop, double check
|
||||||
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 15 && continue #if reports stopped on FIRST time through loop, double check
|
[[ "$count" -le 1 && -z "$verbose" ]] && sleep 10 && continue #if reports stopped on FIRST time through loop, double check
|
||||||
echo_array+=("Stopped")
|
echo_array+=("Stopped")
|
||||||
break #if reports stopped any time after the first loop, assume its extermal services.
|
break #if reports stopped any time after the first loop, assume its extermal services.
|
||||||
elif [[ "$SECONDS" -ge "$timeout" && "$status" == "DEPLOYING" ]]; then
|
elif [[ "$SECONDS" -ge "$timeout" && "$status" == "DEPLOYING" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user