Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support resuming #53

Open
przemoc opened this issue Jan 5, 2023 · 1 comment
Open

Support resuming #53

przemoc opened this issue Jan 5, 2023 · 1 comment

Comments

@przemoc
Copy link

przemoc commented Jan 5, 2023

I did run useful-forks on repo that has >5000 forks, and naturally got GitHub API rate-limits exceeded. It would be nice if there would be a way (button?) to resume scanning after waiting long enough to be no longer blocked on API calls. I tried editing access token to re-save it, but it did not resume activities.

@payne911
Copy link
Collaborator

payne911 commented Jan 8, 2023

This would be a great addition. I'd need to dig some more into the octokit library code to better understand some things.

On the surface, however, after a quick research, it seems like I might have made a little implementation mistake at this location:

onRateLimit: (retryAfter, options, octokit, retryCount) => {
onRateLimitExceeded();
if (retryCount < 1) { // only retries once
return true; // true = retry
}
},

I think I could increase the retry count, and the RATE_LIMIT_EXCEEDED variable may need to somehow be reset to false once a request succeeds (because right now I seem to be doing an early-abort):

function send(requestPromise, successFn, failureFn) {
if (RATE_LIMIT_EXCEEDED) {
failureFn();
return;
}

I'll probably get back on it eventually, but feel free to dig into it yourself and provide a PR if you want this feature to be implemented quickly. :)

Side-note: additionally, that retry should probably also display that timer slider animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants