Skip to content
Snippets Groups Projects
Commit ce0d4b72 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

api: Add an optional requests retry feature to the RPC client

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.
parent 7fd221da
No related tags found
1 merge request!401api: Add an optional requests retry feature to the RPC client
Pipeline #11906 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment