self.config = Config("/etc/planetlab/plc_config")
self.prefix = "ratelimit"
- self.minutes = 3 # The time period
- self.requests = 10 # Number of allowed requests in that time period
+ self.minutes = 5 # The time period
+ self.requests = 50 # Number of allowed requests in that time period
self.expire_after = (self.minutes + 1) * 60
def before(self, wobj, data, *args, **kwargs):
api_method_name = wobj.name
api_method_source = wobj.source
- if api_method_source == None or api_method_source[0] == self.config.PLC_API_HOST:
+ if api_method_source == None or api_method_source[0] == self.config.PLC_API_IP:
return
mc = memcache.Client(['%s:11211'] % self.config.PLC_API_HOST)