This MR aims to cover the case HTTP 429 "Too Many Requests" (RFC685)i n a more specific way rather than the current way to handle any exception between the HTTP status code 400 and 500. This is motivated by the issue opened by @kgpayne here.
Implementation
The first decorator to be executed and added on top will be only evaluated when the HTTP code is 429 and then backoff whatever time is in the Retry-After header that gitlab returns (see here).
The example is literally an implementation of the example supplied in the README.md from the backoff library here + adding the same amount of max_times.
Description
This MR aims to cover the case HTTP
429
"Too Many Requests" (RFC685)i n a more specific way rather than the current way to handle any exception between the HTTP status code 400 and 500. This is motivated by the issue opened by @kgpayne here.Implementation
The first decorator to be executed and added on top will be only evaluated when the HTTP code is 429 and then backoff whatever time is in the
Retry-After
header that gitlab returns (see here). The example is literally an implementation of the example supplied in the README.md from the backoff library here + adding the same amount of max_times.