fix: always wait for storage if rocksdb is selected (#2333)

This commit is contained in:
Dandelion 2023-10-24 17:24:43 +08:00 committed by imbajin
parent 87509b8a99
commit 263bb2feb4
1 changed files with 5 additions and 3 deletions

View File

@ -48,7 +48,9 @@ while IFS=' ' read -r envvar_key envvar_val; do
done < <(env | sort -r | awk -F= '{ st = index($0, "="); print $1 " " substr($0, st+1) }')
# wait for storage
if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then
timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \
"until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done"
if env | grep '^hugegraph\.' > /dev/null; then
if ! [ -z "${WAIT_STORAGE_TIMEOUT_S:-}" ]; then
timeout "${WAIT_STORAGE_TIMEOUT_S}s" bash -c \
"until bin/gremlin-console.sh -- -e $DETECT_STORAGE > /dev/null 2>&1; do echo \"waiting for storage...\"; sleep 5; done"
fi
fi