Skip to content

Adding context cancellation on receiving an OS signal #108

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

Merged
merged 1 commit into from
Mar 16, 2025

Conversation

cbraynor
Copy link
Contributor

Adds a simple OS signal listener to cancel the context passed into the subcommands to allow for shutdown e.g. during the Kubernetes grace period for a Pod

@cbraynor cbraynor changed the title Adding context cancellation to receiving an OS signal Adding context cancellation on receiving an OS signal Mar 16, 2025
Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

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

Nice!

@itzg itzg added the enhancement New feature or request label Mar 16, 2025
@itzg itzg merged commit aea6472 into itzg:master Mar 16, 2025
2 checks passed
@itzg
Copy link
Owner

itzg commented Mar 16, 2025

Included in https://github.com/itzg/mc-monitor/releases/tag/0.15.4

@cbraynor cbraynor deleted the context-cancellation branch March 17, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants