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

Handle task timeout to send SIGTERM #67

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Conversation

Adri2000
Copy link
Contributor

Without this, Python subprocess sends SIGKILL on timeout, leaving no chance of graceful shutdown.

@Adri2000 Adri2000 force-pushed the acunin/task-timeout-sigterm branch from de37e4d to 3800f35 Compare August 10, 2023 16:26
@bpetermannS11
Copy link
Contributor

The unit tests need to be adapted to mock differently than before. subprocess.run was mocked, now it needs to be subprocess.Popen and potentially its functions.

@bpetermannS11 bpetermannS11 force-pushed the acunin/task-timeout-sigterm branch from 6f5fea2 to b4741ac Compare October 30, 2023 13:00
Adri2000 and others added 2 commits October 30, 2023 14:09
Without this, Python subprocess sends SIGKILL on timeout, leaving no
chance of graceful shutdown.
Need to mock subprocess.Popen and its wait method for pre-/post-boot
tasks.
@bpetermannS11 bpetermannS11 force-pushed the acunin/task-timeout-sigterm branch from b4741ac to dd7f07a Compare October 30, 2023 13:09
@Adri2000 Adri2000 merged commit 5a9bea4 into master Nov 2, 2023
6 checks passed
@Adri2000 Adri2000 deleted the acunin/task-timeout-sigterm branch November 2, 2023 14:52
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.

3 participants