racing original
This commit is contained in:
parent
e5e309ecaf
commit
2d39df3601
@ -24,12 +24,12 @@ do
|
|||||||
((count++))
|
((count++))
|
||||||
done
|
done
|
||||||
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
||||||
sleep 10
|
sleep 6
|
||||||
elif [[ $it -lt ${#array[@]} ]]; then
|
elif [[ $it -lt ${#array[@]} ]]; then
|
||||||
until [[ "$proc_count" -ge "$update_limit" || $it -ge ${#array[@]} ]]
|
until [[ "$proc_count" -ge "$update_limit" || $it -ge ${#array[@]} ]]
|
||||||
do
|
do
|
||||||
update_apps "${array[$it]}" &
|
update_apps "${array[$it]}" &
|
||||||
sleep 2
|
sleep 1
|
||||||
processes+=($!)
|
processes+=($!)
|
||||||
((it++))
|
((it++))
|
||||||
((proc_count++))
|
((proc_count++))
|
||||||
@ -38,10 +38,10 @@ do
|
|||||||
if [[ $ttl -eq 1 ]]; then
|
if [[ $ttl -eq 1 ]]; then
|
||||||
sleep 20
|
sleep 20
|
||||||
else
|
else
|
||||||
sleep 10
|
sleep 6
|
||||||
fi
|
fi
|
||||||
elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish
|
elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish
|
||||||
sleep 10
|
sleep 6
|
||||||
else # All processes must be completed, break out of loop
|
else # All processes must be completed, break out of loop
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user