Expand description
Server-task supervision: run a binary’s spawned servers until a shutdown signal, treating any earlier exit as fatal.
A process whose serving task has died must flip readiness off and exit
(so the orchestrator restarts it) rather than keep answering /readyz
over a dead surface.
Functions§
- drain_
grace - Resolve the drain grace from
POLYCHROME_DRAIN_GRACE_SECS, falling back to a default of 25 seconds, comfortably under the Kubernetes defaultterminationGracePeriodSeconds(30s). - until_
shutdown - Block until
shutdownis cancelled or any task inserversfinishes.