GNU bug report logs -
#54241
[PATCH 0/4] 'github' importer gracefully handles rate limiting
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Thu, 3 Mar 2022 21:14:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Maxime Devos <maximedevos <at> telenet.be> skribis:
> Ludovic Courtès schreef op do 03-03-2022 om 22:14 [+0100]:
>> +(define (request-rate-limit-reached?)
>> + "Return true if the rate limit has been reached."
>> + (and %rate-limit-reset-time
>> + (match (< (car (gettimeofday)) %rate-limit-reset-time)
>> + (#t #t)
>> + (#f
>> + (set! %rate-limit-reset-time #f)
>> + #f))))
>
> The clocks used by the GitHub server cannot exactly be the clock of the
> local Guix (at least, not in a realistic setting). WDYT of adding a
> little margin, accounting for the impossibility of clocks exactly
> matching and allowing for some clock skew?
>
> (< (car (gettimeofday)) (+ [5 minutes] %rate-limit-reset-time))
I don’t think it’s necessary. The worst that can happen is that we
retry too early, get another 403 response, and retry later. (In
practice, on my NTP-synchronized laptop, things just work.)
This bug report was last modified 3 years and 78 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.