You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oops, I see that it's outlined in the README. However, I'm getting an error when I use the sample:
settings.py:
BOUNDARY_SERVICE_THROTTLE = {
"timeframe": 60, # timeframe to consider for throttling. In seconds
"throttle_at": 100, # number of requests in the timeframe before blocking
"expiration": 3600 # How long to cache records of client requests
}
Error message upon visiting an API URI:
{"error_message": "'NoneType' object is not iterable", "traceback": "Traceback (most recent call last):\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/tastypie/resources.py\", line 195, in wrapper\n response = callback(request, *args, **kwargs)\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/tastypie/resources.py\", line 435, in dispatch_detail\n return self.dispatch('detail', request, **kwargs)\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/tastypie/resources.py\", line 454, in dispatch\n self.throttle_check(request)\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/tastypie/resources.py\", line 554, in throttle_check\n if self._meta.throttle.should_be_throttled(identifier):\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/boundaryservice/throttle.py\", line 11, in should_be_throttled\n return super(AnonymousThrottle, self).should_be_throttled(identifier, **kwargs)\n\n File \"/home/michaelcorey/.Envs/cir_boundary_service/local/lib/python2.7/site-packages/tastypie/throttle.py\", line 87, in should_be_throttled\n times_accessed = [access for access in cache.get(key) if access >= minimum_time]\n\nTypeError: 'NoneType' object is not iterable\n"}
I'm getting an error when running boundaryservice installed from this repo. What am I supposed to set in my settings as BOUNDARY_SERVICE_THROTTLE?
The text was updated successfully, but these errors were encountered: