Skip to content
Snippets Groups Projects
user avatar
Feanil Patel authored
The rate limiting library computes the rate limit by chunking time since
the epoch into chunks of whatever your period is. It then adds some
consistent offset based on your key.  This means that at certain times,
you are closer to the end of your rate limit time period than others.
So moving 1 minute into the future would put you into the next time
chunk and your rate limit would be reset.

I updated the test to test rate limit at the same time as the initial
call to ensure that we don't end up on the other side of a time chunk
boundary by accident.  We were seeing times in CI where it
would occasionally fail because time chunking wasn't in our favor.
6f1691e5
History
Name Last commit Last update