adaptai / platform /dbops /tools /wait_for_qdrant.sh
ADAPT-Chase's picture
Add files using upload-large-folder tool
503b0e9 verified
#!/usr/bin/env bash
set -euo pipefail
QDRANT_URL=${QDRANT_URL:-http://127.0.0.1:17000}
max_retries=${MAX_RETRIES:-60}
sleep_s=${SLEEP_SECONDS:-2}
i=0
echo "Waiting for Qdrant at $QDRANT_URL ..."
until curl -s -o /dev/null -w "%{http_code}" "$QDRANT_URL/collections" | grep -q '^200$'; do
i=$((i+1))
if [ "$i" -ge "$max_retries" ]; then
echo "Qdrant not ready after $((i*sleep_s))s" >&2
exit 1
fi
sleep "$sleep_s"
done
echo "Qdrant is ready."
exit 0