summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHao Liu <44379968+TheRealHaoLiu@users.noreply.github.com>2023-10-13 15:48:12 +0200
committerGitHub <noreply@github.com>2023-10-13 15:48:12 +0200
commit48f586bac4e1ae634188e9e1244ba132b17c3a4a (patch)
tree9a4d2761ddb113ae4087cee85377e5fad9d77308 /tools
parentAdded alt-text for images in notifications.rst (#14555) (diff)
downloadawx-48f586bac4e1ae634188e9e1244ba132b17c3a4a.tar.xz
awx-48f586bac4e1ae634188e9e1244ba132b17c3a4a.zip
Make wait-for-migrations wait forever (#14566)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ansible/roles/dockerfile/files/wait-for-migrations6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/ansible/roles/dockerfile/files/wait-for-migrations b/tools/ansible/roles/dockerfile/files/wait-for-migrations
index 8557720591..3fcb6ab916 100755
--- a/tools/ansible/roles/dockerfile/files/wait-for-migrations
+++ b/tools/ansible/roles/dockerfile/files/wait-for-migrations
@@ -7,7 +7,6 @@ readonly CMDNAME=$(basename "$0")
readonly MIN_SLEEP=0.5
readonly MAX_SLEEP=30
-readonly ATTEMPTS=30
readonly TIMEOUT=60
log_message() { echo "[${CMDNAME}]" "$@" >&2; }
@@ -25,7 +24,7 @@ wait_for() {
local check=1
while true; do
- log_message "Attempt ${attempt} of ${ATTEMPTS}"
+ log_message "Attempt ${attempt}"
timeout "${TIMEOUT}" \
/bin/bash -c "awx-manage check" &>/dev/null
@@ -37,8 +36,7 @@ wait_for() {
&& return || rc=$?
fi
- (( ++attempt > ATTEMPTS )) && break
-
+ attempt=$((attempt + 1))
log_message "Waiting ${next_sleep} seconds before next attempt"
sleep "${next_sleep}"
next_sleep=$(next_sleep ${next_sleep})