getting rid account ratelimiting default

This commit is contained in:
David Goetz
2010-10-12 09:15:36 -07:00
parent 802c0ccfac
commit 3db727bf1c

View File

@@ -33,7 +33,7 @@ class RateLimitMiddleware(object):
self.logger = logger self.logger = logger
else: else:
self.logger = get_logger(conf) self.logger = get_logger(conf)
self.account_rate_limit = float(conf.get('account_ratelimit', 200.0)) self.account_rate_limit = float(conf.get('account_ratelimit', 0))
self.max_sleep_time_seconds = float(conf.get('max_sleep_time_seconds', self.max_sleep_time_seconds = float(conf.get('max_sleep_time_seconds',
60)) 60))
self.clock_accuracy = int(conf.get('clock_accuracy', 1000)) self.clock_accuracy = int(conf.get('clock_accuracy', 1000))
@@ -89,7 +89,7 @@ class RateLimitMiddleware(object):
should be checked in order. should be checked in order.
""" """
keys = [] keys = []
if account_name and ( if self.account_rate_limit and account_name and (
not (container_name or obj_name) or not (container_name or obj_name) or
(container_name and not obj_name and req_method == 'PUT')): (container_name and not obj_name and req_method == 'PUT')):
keys.append(("ratelimit/%s" % account_name, keys.append(("ratelimit/%s" % account_name,