who knows
This commit is contained in:
parent
68daf5f343
commit
99208d5165
@ -11,7 +11,7 @@ echo "Asynchronous Updates: $update_limit"
|
|||||||
|
|
||||||
# previous 20% 2 min 9 seconds
|
# previous 20% 2 min 9 seconds
|
||||||
it=0
|
it=0
|
||||||
ttl=0
|
first_run=0
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
while true
|
while true
|
||||||
@ -34,19 +34,24 @@ do
|
|||||||
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
if [[ "$proc_count" -ge "$update_limit" ]]; then
|
||||||
sleep 6
|
sleep 6
|
||||||
elif [[ $it -lt ${#array[@]} ]]; then
|
elif [[ $it -lt ${#array[@]} ]]; then
|
||||||
|
ttl=0
|
||||||
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]}" &
|
||||||
processes+=($!)
|
processes+=($!)
|
||||||
sleep 1
|
|
||||||
((it++))
|
((it++))
|
||||||
((proc_count++))
|
((proc_count++))
|
||||||
done
|
|
||||||
((ttl++))
|
((ttl++))
|
||||||
if [[ $ttl -eq 1 ]]; then
|
done
|
||||||
|
((first_run++))
|
||||||
|
if [[ $first_run == 1 ]]; then
|
||||||
|
if [[ $ttl -le 5 ]]; then
|
||||||
|
sleep 15
|
||||||
|
elif [[ $ttl -le 10 ]]; then
|
||||||
sleep 25
|
sleep 25
|
||||||
else
|
elif [[ $ttl -gt 10 ]]; then
|
||||||
sleep 6
|
sleep 35
|
||||||
|
fi
|
||||||
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 6
|
sleep 6
|
||||||
|
Loading…
Reference in New Issue
Block a user