mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-27 17:25:08 +00:00
test: Fix failing test
This commit is contained in:
parent
462197db52
commit
d5fecaf71b
1 changed files with 5 additions and 5 deletions
|
|
@ -22,16 +22,16 @@ check_migration_complete() {
|
||||||
print_group Check migration
|
print_group Check migration
|
||||||
|
|
||||||
container_id=$(docker_compose_with_args ps -q frappe-python)
|
container_id=$(docker_compose_with_args ps -q frappe-python)
|
||||||
thelogs=$(docker logs "${container_id}" 2>&1 | grep "Starting gunicorn")
|
cmd="docker logs ${container_id} 2>&1 | grep 'Starting gunicorn' || echo ''"
|
||||||
|
worker_log=$(eval "$cmd")
|
||||||
INCREMENT=0
|
INCREMENT=0
|
||||||
|
|
||||||
while [[ ${thelogs} != *"Starting gunicorn"* && ${INCREMENT} -lt 120 ]]; do
|
while [[ ${worker_log} != *"Starting gunicorn"* && ${INCREMENT} -lt 120 ]]; do
|
||||||
sleep 3
|
sleep 3
|
||||||
((INCREMENT = INCREMENT + 1))
|
((INCREMENT = INCREMENT + 1))
|
||||||
echo "Wait for migration to complete..."
|
echo "Wait for migration to complete..."
|
||||||
thelogs=$(docker logs "${container_id}" 2>&1 | grep "Starting gunicorn")
|
worker_log=$(eval "$cmd")
|
||||||
|
if [[ ${worker_log} != *"Starting gunicorn"* && ${INCREMENT} -eq 120 ]]; then
|
||||||
if [[ ${thelogs} != *"Starting gunicorn"* && ${INCREMENT} -eq 120 ]]; then
|
|
||||||
echo Migration timeout
|
echo Migration timeout
|
||||||
docker logs "${container_id}"
|
docker logs "${container_id}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue