Enhanced Graceful Shutdown (Drain In-Flight Runs) #80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Phase 1.9 implemented basic HTTP drain. This extends it to also wait for in-flight job runs to complete before exiting.
Tasks
main.goshutdown sequence, afterserver.Shutdown(ctx), add:scheduler.Stop()— stop accepting new scheduled runswatcher.Stop()— stop accepting new file-triggered runspool.Drain()— wait for all in-flight runs to complete (max 5 min timeout)pool.Close()— shut down pooldb.Close()— close DB poolSHUTDOWN_DRAIN_TIMEOUT_SECSAcceptance Criteria