Skip to content

Shutdown gracefully on SIGTERM #140

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Shutdown gracefully on SIGTERM #140

wants to merge 2 commits into from

Conversation

negz
Copy link
Member

@negz negz commented Apr 1, 2025

Description of your changes

Fixes #109
Closes #130

@fernandezcuesta I did a bit of research while reviewing #130 and came across this pattern. What do you think? I still need to test it and see if it actually works.

I have:

negz added 2 commits April 1, 2025 06:59
This file wasn't formatted before making it into main. Not sure why the
linter didn't catch it...

Signed-off-by: Nic Cope <[email protected]>
@fernandezcuesta
Copy link
Contributor

Hi, indeed this looks cleaner than what I did. I still get an error with the lambda which apparently is given 2 positional arguments (that's why I set lambda _, __: ...). Other than that, I just did an e2e test and it gracefully stops blazing-fast.

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.

Python functions shut down slowly
2 participants