dev-to-git icon indicating copy to clipboard operation
dev-to-git copied to clipboard

[Improvement suggestion] - Queue articles publication to meet forem rate limiting

Open PChol22 opened this issue 2 years ago • 3 comments

Hi!

I am a big fan and user of dev-to-git!

My articles repository contains like 20 articles, and it's starting to hit API rate limits when dev-to-git is publishing everything. I have to restart the job multiple times if I want my new articles to be eventually published.

image

I went through forem's documentation, and it seems like the quotas are:

  • 30 calls/30sec for article update
  • 10 calls/30sec for article creation

I think that we could use a small queuing lib designed to stay under the 10calls/30sec rate limit when publishing articles. -> It would not impact people publishing a small amount of articles that much, and would really help big repositories like mine!

I wrote a bit of code that should fix the issue, WDYT? I am open to suggestions and modifications of course.

PChol22 avatar Jul 10 '23 21:07 PChol22

Hi there, thanks for the kind words an the PR!

That said, I'm in the middle of a complete rewrite :sweat_smile: ! Nothing I wanted to mention before it was done to avoid pressure but I feel like I've got to disclose it now haha.

So I'll put this on hold for now and try to take it into account in the new version directly.

maxime1992 avatar Jul 11 '23 07:07 maxime1992

Ok it's totally fine for me! Good luck for your rewrite!

PChol22 avatar Jul 12 '23 08:07 PChol22

I went through forem's documentation, and it seems like the quotas are: 30 calls/30sec for article update 10 calls/30sec for article creation

Where did you find those info? I looked here: https://developers.forem.com/api/v1

But couldn't find it :thinking:

maxime1992 avatar Jul 15 '23 10:07 maxime1992