From ffd23b7e154fc735e30ba31afeb52e13e6762508 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Wed, 10 Aug 2022 19:05:10 -0600 Subject: [PATCH] set delay higher on trigger --- functions/update_apps.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/update_apps.sh b/functions/update_apps.sh index 20095e28..a2c78df3 100644 --- a/functions/update_apps.sh +++ b/functions/update_apps.sh @@ -14,9 +14,11 @@ it=0 while_status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' 2>/dev/null) echo "$while_status" > temp.txt rm trigger &>/dev/null +delay=2 while true do if [[ -f trigger ]]; then + delay=4 if while_status=$(cli -m csv -c 'app chart_release query name,update_available,human_version,human_latest_version,status' 2>/dev/null) ; then echo "$while_status" > temp.txt else @@ -31,7 +33,7 @@ do ((count++)) done if [[ "$proc_count" -ge "$update_limit" ]]; then - sleep 4 + sleep $delay elif [[ $it -lt ${#array[@]} ]]; then until [[ "$proc_count" -ge "$update_limit" || $it -ge ${#array[@]} ]] do @@ -42,7 +44,7 @@ do ((proc_count++)) done elif [[ $proc_count != 0 ]]; then # Wait for all processes to finish - sleep 4 + sleep $delay else # All processes must be completed, break out of loop break fi