admin

Api Prepare Restart

Drain this worker's agents ahead of a planned restart.

Called by the deploy before stopping the process, because by the time a shutdown hook runs uvicorn has already closed the sockets: the hint would have nobody left to tell. Here the sessions are still up, so each agent is given its own retry_after and comes back spread over a window rather than the whole fleet arriving at once while the hub is still starting.

Draining also stops the per-session Redis cleanup that a mass disconnect triggers. That cleanup is three or four round trips per session, it exhausts a pool of 100 within seconds, and it fails for nearly every session anyway -- 10,280 "Too many connections" in a single restart. What it would have written expires by itself in 90 seconds.

Only this worker's own sessions are reachable from here; with several workers the deploy calls it once per worker, or simply accepts that the remainder fall back to their own schedule.

post/admin/api/prepare-restart

Request

  • Base URL: https://mcp.sentinelx.app (the document declares no server; this is the origin it was published from)
  • URL: https://mcp.sentinelx.app/admin/api/prepare-restart
  • Auth: none declared

Query parameters

spread_secondsnumber nullable
refuse_new_workboolean

Cookies

sentinelx_dash_sessionstring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.