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 optional cancellable context #309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dgannon991
Copy link
Contributor

@dgannon991 dgannon991 commented Nov 14, 2024

When using cnab-go in porter, we have a requirement to be able to cancel a long running task.

To this end, I've updated the Run method such that you can provide in a context and then I've updated the docker.exec method such that if the context is cancelled, it will attempt to stop the container.

This is just a suggestion, and one possible solution towards getporter/porter#2234, happy to take feedback and suggestions :)

Cheers!

Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
@dgannon991 dgannon991 force-pushed the feat/2234/cancel-context branch from 332b354 to 1debf88 Compare November 14, 2024 21:24
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.

1 participant