mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-10-26 23:43:41 +03:00
032395007b
Problem: The current version of xrefcheck handles the HTTP responses with the 429 status code just like every other error, when it is possible to try and eliminate the occurrences of such errors within the program itself. Solution: Each time the result of performing a request on a given link is a 429 error, retrieve the Retry-After information, describing the delay (in seconds), from the headers of the HTTP response, or, alternatively, use a configurable default value if the Retry-After header is absent, and rerun the request after an amount of time described by the said value had passed. Only after the number of retries had reached its limiting value, which, as of right now, is not configurable and is hardcoded, is when the 429 error is converted into becoming 'unfixable', and any further attempts to remove the error are terminated. Additionally, the progress bar has been upgraded and the following elements are supplied: 1. an extra color -- Blue -- indicating the errors that might get eliminated during the verification; 2. a timer with the number of seconds left to wait for the restart of the request; if, during the verification, a new 429 error had emerged with the new Retry-After value being greater than or equal to the elapsed time, the timer is immediately updated with that value and begins ticking down each second from scratch. |
||
---|---|---|
.. | ||
check-cli | ||
check-localhost | ||
helpers | ||
helpers.bash |