Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import redis
- RATE_LIMITER_SCRIPT = "" # Change it here to the value the SCRIPT LOAD returned
- HALF_SECOND_LIMIT = 0 # Change to the limit you have recalculated
- r = redis.StrictRedis()
- if int(r.evalsha(RATE_LIMITER_SCRIPT, 0, {})) <= HALF_SECOND_LIMIT:
- call_riot_api()
- else:
- rate_limit_reached()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement