api: Add an optional requests retry feature to the RPC client
- Nov 06, 2024
-
-
Antoine Lambert authored
Add a new enable_requests_retry flag to the swh.core.api.RPCClient class, default to False, allowing to retry requests sent by the client when encountering specific errors. Default policy is to retry when connection errors and transient remote exceptions are raised. Subclasses can change that policy by overriding the retry_policy method. Such failed requests will be retry at most five times with a delay of 10 seconds between each.
ce0d4b72
-