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

Added graceful shutdown for ctrl-C #123

Merged
merged 6 commits into from
Nov 8, 2023
Merged

Added graceful shutdown for ctrl-C #123

merged 6 commits into from
Nov 8, 2023

Conversation

jaredoconnell
Copy link
Contributor

Changes introduced with this PR

This adds a listener for ctrl-c.
The first time it gets it, it cancels the context which is supposed to gracefully end the workflow.
The second time it gets it, it warns the user of a forceful termination.
The last time, it exits the program.

Issues (if there are any) with the graceful exit deserve a separate PR. This just closes the context. If it doesn't close correctly, the problem is how it handles context close.


By contributing to this repository, I agree to the contribution guidelines.

@jaredoconnell jaredoconnell marked this pull request as ready for review November 8, 2023 15:13
Copy link
Contributor

@webbnh webbnh left a comment

Choose a reason for hiding this comment

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

Looks generally OK to me, but I have a few thoughts to share.

cmd/arcaflow/main.go Outdated Show resolved Hide resolved
cmd/arcaflow/main.go Outdated Show resolved Hide resolved
cmd/arcaflow/main.go Outdated Show resolved Hide resolved
workflow/workflow_test.go Show resolved Hide resolved
cmd/run-plugin/run.go Outdated Show resolved Hide resolved
@jaredoconnell jaredoconnell merged commit 85636b4 into main Nov 8, 2023
5 checks passed
@jaredoconnell jaredoconnell deleted the graceful-exit branch November 8, 2023 20:28
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