Feature/graceful shutdown manager - #175
Open
KolaSailaja wants to merge 2 commits into
Open
Conversation
|
@KolaSailaja is attempting to deploy a commit to the Devanshu Tripathi's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Hi @DevanshuTripathi , I've completed the implementation of the Graceful Shutdown Manager with lifecycle hooks and submitted this PR for review. The feature includes:
I would greatly appreciate your review and feedback. If there are any improvements, adjustments, or project-specific conventions you'd like me to follow, I'd be happy to make the necessary changes. Thank you for your time and for maintaining Vodka! |
Owner
|
@KolaSailaja Why do you have 2 PRS for the same issue? |
Author
|
@DevanshuTripathi I am sorry l just missed a look at my exisitng pr and i submitted another one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a Graceful Shutdown Manager with lifecycle hooks to improve application lifecycle management in Vodka.
The implementation allows developers to register startup and shutdown hooks, configure shutdown timeouts, and gracefully handle application termination signals such as
SIGINTandSIGTERM.Changes Made
Lifecycle Hooks
OnStart()OnShutdown()OnShutdownWithPriority()Graceful Shutdown
SIGINTandSIGTERMShutdown Timeout
Added configurable shutdown timeout via:
Uses context-based timeout control for shutdown operations
Hook Execution
Testing
Added tests covering:
Documentation
Updated documentation with examples demonstrating:
Motivation
As applications grow in complexity, developers often need to coordinate cleanup tasks such as:
This feature provides a built-in and reusable solution, reducing boilerplate and improving reliability during deployments and application restarts.
Backward Compatibility
Example
Checklist