update:关闭docs,redoc

This commit is contained in:
lan
2022-12-14 10:21:11 +08:00
parent 68175f9583
commit 1994ba5917
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -34,10 +34,10 @@ class IPRateLimit:
self.ips.pop(ip)
return True
def add_ip(cls, ip):
ip_info = cls.ips.get(ip, {'count': 0, 'time': datetime.now()})
def add_ip(self, ip):
ip_info = self.ips.get(ip, {'count': 0, 'time': datetime.now()})
ip_info['count'] += 1
cls.ips[ip] = ip_info
self.ips[ip] = ip_info
return ip_info['count']
async def remove_expired_ip(self):