PLC_API_HOST/PLC_API_IP
[plcapi.git] / aspects / ratelimitaspects.py
index 0346567..c90758b 100644 (file)
@@ -11,8 +11,8 @@ class BaseRateLimit(object):
         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):
@@ -25,7 +25,7 @@ class BaseRateLimit(object):
         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)