fix: 修复bug
This commit is contained in:
8
dev.sh
8
dev.sh
@@ -21,15 +21,17 @@ case "$CMD" in
|
||||
# Start in background, then wait for Node self-check + health endpoint.
|
||||
docker compose up -d --build "$@"
|
||||
echo "[dev] waiting for server health..."
|
||||
deadline=$((SECONDS + 90))
|
||||
# ComfyUI first startup may take longer while preparing custom nodes.
|
||||
HEALTH_TIMEOUT_SECONDS="${HEALTH_TIMEOUT_SECONDS:-300}"
|
||||
deadline=$((SECONDS + HEALTH_TIMEOUT_SECONDS))
|
||||
ok=0
|
||||
while [ $SECONDS -lt $deadline ]; do
|
||||
if curl -fsS "http://127.0.0.1:3000/api/health" >/dev/null 2>&1; then
|
||||
ok=1
|
||||
break
|
||||
fi
|
||||
# If container exited, fail fast.
|
||||
if ! docker compose ps --status running | grep -q "aivideo"; then
|
||||
# Fail fast only if container actually exited (avoid mis-detecting "starting" state).
|
||||
if docker compose ps --status exited | grep -q "aivideo"; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
|
||||
Reference in New Issue
Block a user