fix(deploy): server-update.sh Health-Check mit Retry (Worker-Startzeit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 16:33:59 +02:00
co-authored by Claude Opus 4.8
parent 8ae792fd90
commit a772785add
+9 -2
View File
@@ -58,8 +58,15 @@ state="$(systemctl is-active "$SERVICE" || true)"
[[ "$state" == "active" ]] || { journalctl -u "$SERVICE" -n 30 --no-pager; die "Service nicht aktiv ($state)."; }
log "Service aktiv"
# ── 4. Health-Check ───────────────────────────────────────────────────────────
if curl -sf --max-time 10 "$HEALTH_URL" >/dev/null; then
# ── 4. Health-Check (mehrere Versuche Worker brauchen kurz zum Starten) ─────
health_ok=false
for attempt in 1 2 3 4 5; do
if curl -sf --max-time 10 "$HEALTH_URL" >/dev/null; then
health_ok=true; break
fi
sleep 2
done
if $health_ok; then
log "Health OK ($HEALTH_URL)"
else
warn "Health-Check fehlgeschlagen Logs prüfen: journalctl -u $SERVICE -n 50"