You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the PRs I had on retrying [1] was to support a generic wait hook, suitable for logging or other per-retry operations.
I was looking at tenacity and wanted to confirm how I'd do this:
deflogged_wait(*args, **kwargs):
# no-op wait just to log on each attemptprint("Yet another logged attempt")
return0@retry(wait=wait_combine(logged_wait, wait_fixed(1000)), ...)defmy_retried_func():
# interesting retryable stuff here
One of the PRs I had on retrying [1] was to support a generic wait hook, suitable for logging or other per-retry operations.
I was looking at tenacity and wanted to confirm how I'd do this:
Is this about right?
[1] rholder/retrying#50
The text was updated successfully, but these errors were encountered: