Replies: 1 comment 1 reply
-
I'm not sure I want that in stamina (the goal isn't a reimplementation of Tenacity after all :)) but you simulate that quite easily by writing your own decorator that raises a well-known exception which you let stamina retry on. Something like: class PleaseRetryError(Exception):
pass
@stamina.retry(on=PleaseRetryError)
@raise_retry_on(return_value=0)
def f():
... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I'd like to retry my function on some specific return result.
For example, if func() return 0, I want to retry it, but currently stamina only allows retry on some exceptions
Beta Was this translation helpful? Give feedback.
All reactions