mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
wait for migrations in awx-web container
This commit is contained in:
committed by
Shane McDonald
parent
a21dcec85d
commit
041e22f609
@@ -22,13 +22,20 @@ wait_for() {
|
||||
local rc=1
|
||||
local attempt=1
|
||||
local next_sleep="${MIN_SLEEP}"
|
||||
local check=1
|
||||
|
||||
while true; do
|
||||
log_message "Attempt ${attempt} of ${ATTEMPTS}"
|
||||
|
||||
timeout "${TIMEOUT}" \
|
||||
/bin/bash -c "! awx-manage showmigrations | grep '\[ \]'" &>/dev/null \
|
||||
&& return || rc=$?
|
||||
/bin/bash -c "awx-manage check" &>/dev/null
|
||||
check=$?
|
||||
|
||||
if [ $check -eq 0 ]; then
|
||||
timeout "${TIMEOUT}" \
|
||||
/bin/bash -c "! awx-manage showmigrations | grep '\[ \]'" &>/dev/null \
|
||||
&& return || rc=$?
|
||||
fi
|
||||
|
||||
(( ++attempt > ATTEMPTS )) && break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user