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

cancel zerorpc call #221

Open
vrnmthr opened this issue Jul 9, 2019 · 3 comments
Open

cancel zerorpc call #221

vrnmthr opened this issue Jul 9, 2019 · 3 comments

Comments

@vrnmthr
Copy link

vrnmthr commented Jul 9, 2019

is there any way to cancel a zerorpc call?

I have a frontend (zerorpc-node) communicating with a backend (zerorpc-python) that needs to:
a) be able to send requests to the backend [standard zerorpc call]
b) be able to run multiple backend processes simultaneously [followed the architecture in https://github.com/0rpc/zerorpc-node/issues/96)
c) be able to cancel a backend process at will [not sure how to do this with current architecture]

Any guidance would be much appreciated.

@shiplu
Copy link
Contributor

shiplu commented Jul 12, 2019

What do mean by processes? Are these operating system processes?

@vrnmthr
Copy link
Author

vrnmthr commented Jul 13, 2019

sorry -- "processes" means zerorpc requests that have been sent to the server

@bombela
Copy link
Member

bombela commented Nov 5, 2019

gevent doesn't support cancelling. There is a cancel method on the AsyncResult, but it is a no-op.

Are timeout not reasonable for your use case? The default timeout is 30s. When the timeout expires, zeropc Server will inject a timeout exception into the coroutine running your handler (note, same happens after missing heartbeats). Any gevent function you call in the coroutine becomes a point were an exception can be injected, effectively cancelling your handler.

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

3 participants