gh-search-cli icon indicating copy to clipboard operation
gh-search-cli copied to clipboard

Rate limit requests

Open bitdivine opened this issue 3 years ago • 1 comments

Motivation

Requests that return more than about 100 records fail because of rate limiting by github; in my case I am expecting about 300 lines, which is not a huge amount and not abusive or unreasonable, but it fails because the pagination calls are rate limited.

Proposal

Add an command line flag giving a pause to make before successive API calls, or rate limit automatically, e.g. by waiting a minute or two and then retrying after a failed call.

bitdivine avatar Sep 17 '21 13:09 bitdivine

I see that you already back off in base-commands.ts. Maybe there just needs to be a longer backoff, or a way for the user to extend the backoff. A very naive solution:

< + 100
> + process.env.QUERY_INTERVAL || 100

bitdivine avatar Sep 17 '21 16:09 bitdivine