HomeSoftware Heritage

client: add some basic error detection and rate limiting

Description

client: add some basic error detection and rate limiting

We retry on error and we adjust to the X-RateLimit header the server
send us. This is quite basic, and has to struggle against the async
implementation of the request.

So further works should probably refactor the concurrency of the request
implementation before going further.

See inline documentation for details.

Better handling of ClientConnectionError are also needed.

Details

Provenance
marmouteAuthored on Sep 26 2022, 11:07 PM
marmoutePushed on Sep 29 2022, 5:34 PM
Differential Revision
D8541: Make HTTP requests more resilient
Parents
rDTSCN1b05e7f3ee5d: client: prepare for retry
Branches
Unknown
Tags
Unknown
Build Status
Buildable 31941
Build 49991: test-and-buildJenkins console · Jenkins