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

FEATURE: Graceful shutdown and process groups for child processes #33

Merged
merged 5 commits into from
Apr 7, 2022

Conversation

hlubek
Copy link
Member

@hlubek hlubek commented Apr 4, 2022

Implements shutdown via SIGINT (graceful) and SIGTERM (cancelling jobs).
Also fix an issue with child processes from scripts by setting setpgid
to start processes (which is needed to prevent signals being forwarded).

Closes #14

Implements shutdown via SIGINT (graceful) and SIGTERM (cancelling jobs).
Also fix an issue with child processes from scripts by setting setpgid
to start processes (which is needed to prevent signals being forwarded).

Closes #14
@hlubek hlubek requested a review from skurfuerst April 4, 2022 17:49
@coveralls
Copy link

coveralls commented Apr 4, 2022

Pull Request Test Coverage Report for Build 2107505119

  • 66 of 77 (85.71%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.07%) to 82.048%

Changes Missing Coverage Covered Lines Changed/Added Lines %
prunner.go 66 77 85.71%
Totals Coverage Status
Change from base Build 2089413088: 1.07%
Covered Lines: 681
Relevant Lines: 830

💛 - Coveralls

@hlubek
Copy link
Member Author

hlubek commented Apr 4, 2022

@skurfuerst I wanted to implemented a graceful shutdown mechanism and ended fixing also the script child process issue. Would be cool if you could have a look at it, since this change got a bit larger than I expected ;)

prunner.go Outdated Show resolved Hide resolved
prunner.go Show resolved Hide resolved
taskctl/executor.go Outdated Show resolved Hide resolved
taskctl/runner.go Outdated Show resolved Hide resolved
taskctl/executor_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@skurfuerst skurfuerst left a comment

Choose a reason for hiding this comment

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

really cool, just found a little nitpick / question :)

prunner.go Outdated Show resolved Hide resolved
@hlubek hlubek merged commit e19bcf8 into main Apr 7, 2022
@ahaeslich ahaeslich deleted the 14-graceful-shutdown branch November 14, 2023 10: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.

Graceful shutdown
3 participants