Closed josh-chamberlain closed 2 months ago
callback.py
is likely to come only from Github, I tried to set the rate limit to exempt using the @limiter.exempt
decorator. But it wasn't working for reasons I could not figure out, and was instead limiting by the default rate limit. So I instead settled for the really stupid solution of setting the rate limit to 1 million calls per second, which works.@limiter.limit
. @limiter.exempt
decorator, but since exempt didn't work as I described above, I got rid of that test.{
"http_status_code": 500,
"message": "429 Too Many Requests: 1 per 1 minute"
}
@handle_requests
decorator), some methods, when reaching their rate limit, will return a 500 (Internal Error) status code rather than the 429 (Too Many Requests) status code. Not a major issue at this moment, but probably worth noting for the future.
Context
We're building new endpoints as part of #248, and discussing this in places like https://github.com/Police-Data-Accessibility-Project/data-sources-app/issues/345
Requirements
nice to have:
leaky bucket
on some endpoints to allow bursts of activityTests
?
Docs
mention this in the API docs; path to complain if people think they're too strict
Open questions
Most of these numbers and specifics can change