What's the best way to implement a python retry mechanism for failed operations? or How do you handle

20 Replies, 1962 Views

War story time: Once rolled my own python retry logic and missed a edge case where retries piled up during a outage. Cue chaos.

Now I just use `tenacity` with `stop_after_attempt(5)` and `wait_random_exponential()`. Sleeps like a baby.

Logging: I log first and last attempt. Best of both worlds.

Messages In This Thread



Users browsing this thread: 1 Guest(s)