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

Add timeout around execution of external Python program #285

Open
benjastudio opened this issue Aug 10, 2017 · 0 comments
Open

Add timeout around execution of external Python program #285

benjastudio opened this issue Aug 10, 2017 · 0 comments

Comments

@benjastudio
Copy link
Contributor

It would be useful to let the user define a timeout value when using the decorator @execute.python().

Eg:

import time
def sleep_and_return(seconds):
    time.sleep(seconds)
    return seconds

func = execute.python(timeout=0.5)(sleep_and_return)  # <== adding a new "timeout" parameter
result = func(10)  # <== It would be nice to raise after 0.5 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant