- new per-host service, follows node-agent pattern - 7 new HA event types defined (routing in supervisor — Phase 5) - HeartbeatCheck as pipeline validator (pings /api/, emits ha_websocket_dead) - service.yaml + host configs for piha (ken) and chelsty-infra (chelsty) - test scaffolding with aiohttp/aiosqlite mocks (15/15 passing) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
287 B
Bash
Executable file
13 lines
287 B
Bash
Executable file
#!/bin/sh
|
|
# Healthcheck: probe the FastAPI /health endpoint
|
|
set -e
|
|
PORT="${PORT:-8087}"
|
|
python -c "
|
|
import urllib.request, sys
|
|
try:
|
|
r = urllib.request.urlopen('http://localhost:${PORT}/health', timeout=5)
|
|
sys.exit(0 if r.status == 200 else 1)
|
|
except Exception:
|
|
sys.exit(1)
|
|
"
|