Skip to content
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

feat: handle graceful shutdown #64

Merged
merged 1 commit into from
Nov 21, 2024
Merged

feat: handle graceful shutdown #64

merged 1 commit into from
Nov 21, 2024

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Nov 18, 2024

Trap termination signals in the main program using context.Context.

If a SIGINT or SIGTERM is received, send a SIGTERM to the sub-programs and wait for them to shutdown gracefully.

If the sub-program is stuck for 5 minutes, force-kill them.

Replaces #63

@zimbatm zimbatm requested review from r-vdp and jfroche November 18, 2024 12:43
Trap termination signals in the main program using context.Context.

If a SIGINT or SIGTERM is received, send a SIGTERM to the sub-programs
and wait for them to shutdown gracefully.

If the sub-program is stuck for 5 minutes, force-kill them.
Copy link
Member

@r-vdp r-vdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly!

@r-vdp r-vdp merged commit eaa6260 into main Nov 21, 2024
6 checks passed
@zimbatm zimbatm deleted the graceful-shutdown branch November 21, 2024 13:17
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.

2 participants