Skip to content

Make graceful shutdown timeout configurable#8

Merged
pscheid92 merged 1 commit intomainfrom
configurable-shutdown-timeout
Feb 22, 2026
Merged

Make graceful shutdown timeout configurable#8
pscheid92 merged 1 commit intomainfrom
configurable-shutdown-timeout

Conversation

@pscheid92
Copy link
Owner

@pscheid92 pscheid92 commented Feb 22, 2026

Summary

  • Add SHUTDOWN_TIMEOUT env var (default: 10s) to configure the graceful shutdown deadline
  • Remove hardcoded shutdownTimeout constant from cmd/server/main.go
  • Pass cfg.ShutdownTimeout into runGracefulShutdown, following the existing SESSION_MAX_AGE pattern

Test plan

  • make build compiles
  • make test-short passes
  • make lint passes
  • Run server with custom SHUTDOWN_TIMEOUT=30s, send SIGTERM, confirm shutdown respects the configured timeout

🤖 Generated with Claude Code

The shutdown timeout was hardcoded to 10s. Long-running webhook
processing or slow database drains could get cut off. Add a
SHUTDOWN_TIMEOUT env var (default: 10s) following the existing
SESSION_MAX_AGE pattern.
@pscheid92 pscheid92 merged commit acf9188 into main Feb 22, 2026
1 check passed
@pscheid92 pscheid92 deleted the configurable-shutdown-timeout branch February 22, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant