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

Exposes runner.NewRequester publicly #224

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

codyl-stripe
Copy link
Contributor

@codyl-stripe codyl-stripe commented Sep 15, 2020

Per #223 this PR adds the ability to create a runner.Requester without having to call runner.Run which has the issue that it blocks when called.

Being able to create and have direct access to the runner.Requester means that a user can setup differing ways of canceling runs beyond what is possible with runner.Run as they will have direct access to runner.Requester.Stop(...).

A potential alternative to this is exposing a new option that takes a channel that can be used to listen for a cancel signal, although that seems like a bit more complicated approach than this.

@codyl-stripe codyl-stripe changed the title Expose runner.NewRequester publicly Exposes runner.NewRequester publicly Sep 15, 2020
@bojand bojand merged commit d5dca2f into bojand:master Sep 18, 2020
@bojand
Copy link
Owner

bojand commented Sep 18, 2020

Hello, thanks for the PR!

It's been released in v0.60.0. You should be able to update the dependency using go get ...:

go get -u github.com/bojand/[email protected]

I will keep #223 open for now as I do believe perhaps longer term having a cancel channel config option may be a useful way to allow for this as well, without clients having to mess with the requestor instance. Wanted to get this unblocked until I can get to that change.

Thanks again, feel free to open any issues if they come up.

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.

2 participants