Overwrite retry_hooks on function or at call location. #90
StefanBRas
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Sorry for the late response. Couldn't possibly the name of the function that is part of the details work as such filter? That would have the upside that you wouldn't litter your actual code with introspection-specific gunk. Also that said, is it such a big deal to have a few extra log entries that would warrant such heavy-handed changes? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have cases where I would like to log retries for some functions in one way and for other functions in another way.
It looks to me like this can only be done by changing the global retry hooks between calls. I'm also not sure how that would work with threading or async.
Concretely I have cases where I expect an error and I don't want to log those as warnings. This often happen if I'm waiting for some service to come online, then I expect the first call to fail.
Maybe it could be allow to specify some retry_hook args when
stamina.retry
that would then be set on theRetryDetails
and passed to the retry_hook:Beta Was this translation helpful? Give feedback.
All reactions