feat(api): new ratelimit handling

This commit is contained in:
alyssa 2024-08-04 07:48:16 +09:00
parent cfde105e19
commit e23528383f
3 changed files with 91 additions and 20 deletions

View file

@ -7,6 +7,7 @@ local rate = ARGV[2]
local period = ARGV[3]
-- we're only ever asking for 1 request at a time
-- todo: this is no longer true
local cost = 1 --local cost = tonumber(ARGV[4])
local emission_interval = period / rate