From 59759c4151d9d2f668df4b3faabf6dc6369fcc84 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaev-Axenov Date: Fri, 30 May 2025 16:51:39 +0300 Subject: [PATCH] debug fix v14 --- clr_test/db-updater/init.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clr_test/db-updater/init.sh b/clr_test/db-updater/init.sh index 32e6d0f3c..03b82143c 100644 --- a/clr_test/db-updater/init.sh +++ b/clr_test/db-updater/init.sh @@ -1,9 +1,12 @@ #!/bin/sh -echo "PSQL version: " && psql --version +until pg_isready -U clearing -h db -p 5432 -d clearing -t 1; do + echo "Waiting for database to be ready..." + sleep 2 +done -cat init.sql - -echo "Updating database" && psql -h db clearing < init.sql clearing +echo "PSQL version: $(psql --version)" +echo "Updating database" +psql -U clearing -h db -p 5432 -d clearing -f init.sql tail -f /dev/null \ No newline at end of file