RateLimit
object RateLimit
Content copied to clipboard
Implements the ability wo work with GitHub's rate limit, recognize blocks from previous attempts, wait and retry.
Functions
getWaitLength
Link copied to clipboard
calculate required wait in ms
isLimitReached
Link copied to clipboard
Maintain and check a rate-limit
notifyHttpResponse
Link copied to clipboard
http responses should be passed to this so the actual rate limit window can be evaluated and used. The very first response and all 403 ones are good candidates if they can be expected to contain GitHub's rate limit headers.
waitForLimit
Link copied to clipboard
If rate limit in effect, sleep long enough to allow next request.
Properties
firstRequest
Link copied to clipboard
intervalInMilliSeconds
Link copied to clipboard
maxRequestsPerInterval
Link copied to clipboard
maxWaitLoop
Link copied to clipboard
Sources
jvm source
Link copied to clipboard