python-ovh icon indicating copy to clipboard operation
python-ovh copied to clipboard

Feat autoretry

Open martintamare opened this issue 2 years ago • 0 comments

Following https://github.com/ovh/python-ovh/pull/69

I think auto retry would be a nice feature.

What do you think about the following approach ?

It use backoff and by default has the same behavior as the old client. If someone would use auto_retry=4 in client init, by default Exceptions HTTPError and NetworkError would perform an auto_retry. Exceptions can be parametrize so as to perform auto_retry on precise exceptions you want.

Tests are not done yet but will be, if you want it interesting.

martintamare avatar Mar 29 '23 12:03 martintamare