tenacity
tenacity copied to clipboard
logging helpers could include call arguments
I'm using before_sleep
with async - and I can see same function is being retried,
but I'd like to see what arguments are for each retried function (as same fun with different args are executed concurrently)
maybe in call
could bind args
, kwargs
to retry object (self) -- and then they will be passed to log_it
?
+1. This would be useful if I need the logging message to display something like "attempts 1 out of 5 tried...", in which the number 5 is the value I pass to retry(stop=stop_after_attempt(5))
.