Skip to content

Comment on How to be below API rate limits from multiple serversparent

Comments

The only downside I see to this approach in the context of this post is that then you'd essentially need to dedicated daemon sending releases to the semaphore for #1.

I suppose you could use a long running celery task for that purpose. You wouldn't want to fire of (1.0 / cps) celery tasks just for releasing semaphores unless the value of cps was very small -- as it would congest your queues with a bunch of small cleanup tasks. Which aren't guaranteed to run precisely that often.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.