Fix "Too many "Too Many Requests" log" (#761)

Fixed #747

 - Add dep compact_str v0.6.1 to binstalk-downloader
 - Impl new type `DelayRequest`
 - Handle 503/429 with wait duration > `MAX_RETRY_DURATION` by simply taking the min
 - Fix `Client::send_request_inner`: Ensure 503/429 get propagated to other requests
   
   even if the current requests reach its maximum retry and decides to
   simply return an error.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-02-04 11:14:53 +11:00 committed by GitHub
parent e510511487
commit f2fc37eea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 134 additions and 12 deletions

1
Cargo.lock generated
View file

@ -211,6 +211,7 @@ dependencies = [
"binstall-tar",
"bytes",
"bzip2",
"compact_str",
"digest",
"flate2",
"futures-util",