fix: start-coding-server.sh — curl-Fehler (TCP-Reset) nicht als Fatal behandeln
curl gibt Exit-Code 56 zurück wenn der Server die Verbindung während des Modell-Ladens zurücksetzt. Mit set -e brach das Skript dadurch ab, obwohl der Container noch startete. || HTTP_CODE="000" fängt den Fehler ab und lässt die Warte-Schleife korrekt weiterlaufen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
40b447f3ce
commit
42d8e921fa
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ for i in {1..150}; do
|
|||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 \
|
||||
-X POST "http://localhost:${HOST_PORT}/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"model\":\"${MODEL_ALIAS}\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":1,\"temperature\":0.0,\"stream\":false}")
|
||||
-d "{\"model\":\"${MODEL_ALIAS}\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":1,\"temperature\":0.0,\"stream\":false}") || HTTP_CODE="000"
|
||||
if [ "$HTTP_CODE" = "200" ]; then MODEL_READY=1; break; fi
|
||||
echo " [${i}/150] HTTP ${HTTP_CODE:-000} — Modell lädt noch, warte 2s ..."
|
||||
sleep 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue