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

View file

@ -16,6 +16,7 @@ async_zip = { version = "0.0.9", features = ["deflate", "bzip2", "lzma", "zstd",
binstalk-types = { version = "0.2.0", path = "../binstalk-types" }
bytes = "1.4.0"
bzip2 = "0.4.4"
compact_str = "0.6.1"
digest = "0.10.6"
flate2 = { version = "1.0.25", default-features = false }
futures-util = { version = "0.3.26", default-features = false, features = ["std"] }