coopboost
coopboost copied to clipboard
Dealing with rate limits
I seeded a few users and ran add-followers.js
. Worked for a while (I got ~1100 people to follow saved to the DB) then threw a rate limit-related error:
{ code: 88, message: 'Rate limit exceeded.' }
unhandledRejection ReferenceError: i is not defined
at Object.follow (/app/lib/tasks.js:37:9)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Same thing happened when I ran the follow.js
command.
I'm guessing this isn't a huge deal since the cron job will run these commands again every day, so eventually it will get all the accounts followed, but is there a more elegant way we could deal with this? Would you be interested in entertaining a "back off" approach? Has it been tried and scrapped already?
Happy to make a PR once we have a better idea of what to do.