jackellenberger / emojme

:rotating_light: very powerful very stupid Slack emoji tools, holy cow! :rotating_light:

Home Page:https://jackellenberger.github.io/emojme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Improvement] Allow bursting for rate limited requests

jackellenberger opened this issue · comments

For operations like downloading the initial emojilist, if you have more than 50 pages of emoji (and we do), then the minimum download time is SLACK_REQUEST_WINDOW = 60000ms. That's kind of a nasty user experience, esp because slack does allow bursting. We could get our 53 pages in no time at all by just running emojme with the SLACK_REQUEST_RATE set to 60, but that will override other rate limited endpoints to use that rate, which may fail in a sync type scenario.

If we just build in bursting, mayyyybe that'd make the problem easier. the implementation I imagine is just "go as fast as possible until we get rate limited, then abide by the limit." shrug_intensifies