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

Check for rate limiting while fetching posts #7

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

cyle
Copy link

@cyle cyle commented Dec 7, 2023

If you're trying to import posts from a blog that has thousands of posts, you will quickly hit the rate limit. I think this should make the importer chill and wait for the next minute to try again?

cc @pento

case 420: // rate limited
case 429: // rate limited
// make this chill for a minute
return false;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the calling side(s), returning false seems to make it think it just needs to wait for later? it's hard for me to understand how this is meant to work, and it's definitely not resilient for this kind of event. looks like it'll keep while looping and getting a 429 Limit Exceeded, but maybe at least now it won't fail outright and stop trying.

@cyle
Copy link
Author

cyle commented Jan 23, 2024

maybe @westi can help me with this

@roccotripaldi
Copy link

roccotripaldi commented Oct 25, 2024

I tested locally with a Tumblr blog that had over 1,000 posts, and it worked well.
I'm going to test on a remote server soon.

Any chance you can test this with a Tumblr blog that has a larger amount of posts?

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

Successfully merging this pull request may close these issues.

2 participants