-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Adds graceful shutdown when INT/TERM/QUIT signal is received #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bougyman
commented
Aug 2, 2025
- refactor: Lowers AbcSize for building workers
- chore: move instance methods to an instance method module and update impacted tests
- feat: Adds Dry::Configurable extension, and makes #logger a configurable setting
- feat: Adds graceful termination of workers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds graceful shutdown functionality to the NATS API server, allowing it to properly handle INT/TERM/QUIT signals and cleanly terminate workers. It also refactors the codebase by moving instance methods to a dedicated module and introducing Dry::Configurable for better configuration management.
- Adds signal trapping for graceful shutdown of workers and thread pools
- Refactors code by separating instance methods into an
InstanceMethodsmodule - Introduces
Dry::Configurableextension and makes logger configurable
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lib/leopard/nats_api_server.rb | Implements graceful shutdown, adds instance methods module, and configurable logger |
| test/lib/nats_api_server.rb | Updates test require path and adapts tests for instance method refactoring |