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

Use asynchronous ssclient #29

Open
nzlosh opened this issue Feb 7, 2020 · 0 comments
Open

Use asynchronous ssclient #29

nzlosh opened this issue Feb 7, 2020 · 0 comments

Comments

@nzlosh
Copy link
Owner

nzlosh commented Feb 7, 2020

Both btubbs/sseclient and mpetazzoni/sseclient use synchronous libraries under the hood.

The sseclient runs in a separate thread and listens to StackStorm's stream api. Both sseclient implementations work well until the err-stackstorm plugin is instructed to deactivate.

Both sseclients block waiting for events. In the case of mpetazzoni/sseclient the is no obvious way to signal the underlying event loop to stop and the client remains blocked until the process is terminated. In the case of btubbs/sseclient, the event loop executes at least every 60s when an empty event is emitted by the stream API.

To improve behaviour when the plugin is shutdown, an asynchronous sseclient should be used to avoid blocking.

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

No branches or pull requests

1 participant