"What's the best way to implement a python retry mechanism for failed operations?"
Hey folks!
I've been banging my head against this one—how do *you* handle python retry logic for flaky ops? Like, APIs that timeout or DB calls that randomly fail.
I’ve tried rolling my own with `while` loops and `try/except`, but it feels clunky. Found `tenacity` and `retrying` libs, but curious if there’s a cleaner way.
Do y'all prefer decorators? Configurable backoffs? Or just brute-force retries?
Also, how do you handle logging—spammy or just fail silently until max retries?
Kinda new to this, so any tips or war stories would be awesome.
Thanks! 🚀
Hey folks!
I've been banging my head against this one—how do *you* handle python retry logic for flaky ops? Like, APIs that timeout or DB calls that randomly fail.
I’ve tried rolling my own with `while` loops and `try/except`, but it feels clunky. Found `tenacity` and `retrying` libs, but curious if there’s a cleaner way.
Do y'all prefer decorators? Configurable backoffs? Or just brute-force retries?
Also, how do you handle logging—spammy or just fail silently until max retries?
Kinda new to this, so any tips or war stories would be awesome.
Thanks! 🚀
