Watchdog respects keep-server-running setting via /watchdog/disable endpoint

This commit is contained in:
Jamie Pine
2026-03-15 06:05:17 -07:00
parent e239be5bbb
commit 410413dc57
3 changed files with 42 additions and 11 deletions
+8
View File
@@ -143,6 +143,14 @@ async def shutdown():
return {"message": "Shutting down..."}
@app.post("/watchdog/disable")
async def watchdog_disable():
"""Disable the parent process watchdog so the server keeps running."""
from backend.server import disable_watchdog
disable_watchdog()
return {"message": "Watchdog disabled"}
@app.get("/health", response_model=models.HealthResponse)
async def health():
"""Health check endpoint."""