kin: KIN-083 Healthcheck claude CLI auth: перед запуском pipeline проверять что claude залогинен (быстрый claude -p 'ok' --output-format json, проверить is_error и 'Not logged in'). Если не залогинен — не запускать pipeline, а показать ошибку 'Claude CLI requires login' в GUI с инструкцией.
This commit is contained in:
parent
a80679ae72
commit
bfc8f1c0bb
18 changed files with 1390 additions and 57 deletions
|
|
@ -19,20 +19,13 @@ npm run build
|
|||
echo "[rebuild-frontend] Build complete."
|
||||
|
||||
# Restart API server if it's currently running.
|
||||
# API is managed by launchctl with KeepAlive=true — just kill it, launchctl restarts it.
|
||||
# pgrep returns 1 if no match; || true prevents set -e from exiting.
|
||||
API_PID=$(pgrep -f "uvicorn web.api" 2>/dev/null || true)
|
||||
if [ -n "$API_PID" ]; then
|
||||
echo "[rebuild-frontend] Stopping API server (PID: $API_PID) ..."
|
||||
echo "[rebuild-frontend] Restarting API server (PID: $API_PID) — launchctl will auto-restart ..."
|
||||
kill "$API_PID" 2>/dev/null || true
|
||||
# Wait for port 8420 to free up (up to 5 s)
|
||||
for i in $(seq 1 5); do
|
||||
pgrep -f "uvicorn web.api" > /dev/null 2>&1 || break
|
||||
sleep 1
|
||||
done
|
||||
echo "[rebuild-frontend] Starting API server ..."
|
||||
cd "$PROJECT_ROOT"
|
||||
nohup python -m uvicorn web.api:app --port 8420 >> /tmp/kin-api.log 2>&1 &
|
||||
echo "[rebuild-frontend] API server started (PID: $!)."
|
||||
echo "[rebuild-frontend] API server restarted (launchctl KeepAlive=true)."
|
||||
else
|
||||
echo "[rebuild-frontend] API server not running; skipping restart."
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue