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

feature request: timeout_exception=None to terminate function without raising exception #70

Open
mdavis-xyz opened this issue Oct 6, 2021 · 0 comments

Comments

@mdavis-xyz
Copy link

I have some code where I save some non-essential logging information to AWS CloudWatch. Often it takes too long, so I use this timeout decorator.
But if it does time out, I don't want my whole script to fail. I want to ignore the timeout error and continue.
Currently I need to wrap the code that invokes my decorated function in a try/except block. I would like to be able to tell the decorator to not raise any exception when the function times out. Just stop the function, and then return None.

timeout_exception=None would be one possible way to do this. Or perhaps a new argument?

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