sticking to one at a time, anymore is overloading

This commit is contained in:
Heavybullets8 2022-08-10 22:35:30 -06:00
parent 8af787f2d4
commit 116279db37

View File

@ -77,14 +77,14 @@ do
if [[ "$proc_count" -ge "$update_limit" ]]; then if [[ "$proc_count" -ge "$update_limit" ]]; then
sleep 3 sleep 3
elif [[ $it -lt ${#array[@]} ]]; then elif [[ $it -lt ${#array[@]} ]]; then
loop=0 # loop=0
until [[ $loop -ge 2 || $it -ge ${#array[@]} ]]; # until [[ $loop -ge 2 || $it -ge ${#array[@]} ]];
do # do
update_apps "${array[$it]}" & update_apps "${array[$it]}" &
processes+=($!) processes+=($!)
((loop++)) ((loop++))
((it++)) ((it++))
done # done
elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish
sleep 3 sleep 3
else # All processes must be completed, break out of loop else # All processes must be completed, break out of loop