[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exh
From: |
Maxime Devos |
Subject: |
[bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion. |
Date: |
Sat, 05 Mar 2022 10:37:03 +0100 |
User-agent: |
Evolution 3.38.3-1 |
Ludovic Courtès schreef op do 03-03-2022 om 22:14 [+0100]:
> + (and (not (request-rate-limit-reached?))
> + (guard (c ([...]
> + ;; See
> + ;;
> <https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting>.
> + (match (assq-ref (http-get-error-headers c)
> + 'x-ratelimit-remaining)
> + (#f
> + (raise c))
> + ((? (compose zero? string->number))
> + (let ((reset (update-rate-limit-reset-time!
> + (http-get-error-headers c))))
> + (warning (G_ "GitHub rate limit exceeded; \
> +disallowing requests for ~a seconds~%")
> + (- reset (car (gettimeofday))))
> + (display-hint (G_ "You can waive the rate limit by
> +setting the @env{GUIX_GITHUB_TOKEN} environment variable to a token obtained
> +from @url{https://github.com/settings/tokens} with your GitHub account.
IIRC, the GitHub documentation doesn't state that this waives the rate
limit, rather it increases the rate limit a lot, but there's still a
limit.
Greetings,
Maxime.
signature.asc
Description: This is a digitally signed message part
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/03
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/06
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 2/4] import: github: Gracefully handle rate limit exhaustion., Maxime Devos, 2022/03/05
- [bug#54241] [PATCH 0/4] 'github' importer gracefully handles rate limiting, Ludovic Courtès, 2022/03/05