test
This commit is contained in:
parent
cb25487dff
commit
2fd4d0a926
@ -12,7 +12,7 @@ echo "Asynchronous Updates: $update_limit"
|
|||||||
|
|
||||||
touch temp.txt
|
touch temp.txt
|
||||||
it=0
|
it=0
|
||||||
while [[ $it -lt ${#array[@]} ]]
|
while true
|
||||||
do
|
do
|
||||||
cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' > temp.txt
|
cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' > temp.txt
|
||||||
proc_count=${#processes[@]}
|
proc_count=${#processes[@]}
|
||||||
@ -23,18 +23,20 @@ do
|
|||||||
done
|
done
|
||||||
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
||||||
sleep 3
|
sleep 3
|
||||||
else
|
elif [[ $it -lt ${#array[@]} ]]; then
|
||||||
update_apps "${array[$it]}" &
|
update_apps "${array[$it]}" &
|
||||||
processes+=($!)
|
processes+=($!)
|
||||||
((it++))
|
((it++))
|
||||||
|
else
|
||||||
|
for proc in "${processes[@]}"
|
||||||
|
do
|
||||||
|
wait "$proc"
|
||||||
|
done
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm temp.txt
|
rm temp.txt
|
||||||
|
|
||||||
for proc in "${processes[@]}"
|
|
||||||
do
|
|
||||||
wait "$proc"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
export -f commander
|
export -f commander
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user