-
-
Notifications
You must be signed in to change notification settings - Fork 304
Closed
Description
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:
def logged_wait(*args, **kwargs):
# no-op wait just to log on each attempt
print("Yet another logged attempt")
return 0
@retry(wait=wait_combine(logged_wait, wait_fixed(1000)), ...)
def my_retried_func():
# interesting retryable stuff hereIs this about right?
Metadata
Metadata
Assignees
Labels
No labels