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

Exit on SIGTERM #393

Merged
merged 4 commits into from
Sep 8, 2021
Merged

Exit on SIGTERM #393

merged 4 commits into from
Sep 8, 2021

Conversation

iffyio
Copy link
Collaborator

@iffyio iffyio commented Sep 7, 2021

we currently only listen for SIGINT while k8s sends
a SIGTERM to shutdown a process, so we need to listen for that
too

we currently only listen for SIGINT while k8s sends
a SIGTERM to shutdown a process, so we need to listen for that
too
@iffyio iffyio marked this pull request as ready for review September 7, 2021 16:39
src/runner.rs Outdated
let sig_term = sig_term_fut.recv();
tokio::select! {
_ = signal::ctrl_c() => {
info!(signal_log, "Received SIGINT")
Copy link
Contributor

Choose a reason for hiding this comment

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

Mega nit: Should this be debug!? Not sure if production really cares which signal it gets?

Otherwise, this is a great catch 👍🏻

@markmandel
Copy link
Contributor

(Totally random - but why is the notification bot not working for this PR?)

@markmandel markmandel merged commit 398db56 into main Sep 8, 2021
@markmandel markmandel deleted the iu/sigterm branch September 8, 2021 17:47
@markmandel markmandel added the kind/cleanup Refactoring code, fixing up documentation, etc label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes kind/cleanup Refactoring code, fixing up documentation, etc size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants