diff roundup/rate_limit.py @ 5722:2f116ba7e7cf

Rename Store class in rate_limit.py to Gcra. The name Store makes no sense since the class implements a Gcra, I'll call it Gcra....
author John Rouillard <rouilj@ieee.org>
date Fri, 17 May 2019 19:45:15 -0400
parents cad18de2b988
children e225f403cc35
line wrap: on
line diff
--- a/roundup/rate_limit.py	Sat May 11 21:22:48 2019 -0400
+++ b/roundup/rate_limit.py	Fri May 17 19:45:15 2019 -0400
@@ -16,7 +16,7 @@
         return self.period.total_seconds() / self.count
 
 
-class Store:
+class Gcra:
 
     memory = {}
 
@@ -82,7 +82,7 @@
 
         # static defined headers according to limit
         ret['X-RateLimit-Limit'] = limit.count
-        ret['X-RateLimit-Limit-Period'] = limit.period.total_seconds()
+        ret['X-RateLimit-Limit-Period'] = int(limit.period.total_seconds())
 
         # status of current limit as of now
         now = datetime.utcnow()

Roundup Issue Tracker: http://roundup-tracker.org/