forked from mirrors/LibreTranslate
remove debug print
This commit is contained in:
parent
adfdc8c9e5
commit
df0c64450a
1 changed files with 0 additions and 4 deletions
|
@ -19,8 +19,6 @@ def setup(violations_threshold=100):
|
||||||
active = True
|
active = True
|
||||||
threshold = violations_threshold
|
threshold = violations_threshold
|
||||||
|
|
||||||
print(violations_threshold)
|
|
||||||
|
|
||||||
scheduler = BackgroundScheduler()
|
scheduler = BackgroundScheduler()
|
||||||
scheduler.add_job(func=clear_banned, trigger="interval", weeks=4)
|
scheduler.add_job(func=clear_banned, trigger="interval", weeks=4)
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
@ -33,13 +31,11 @@ def report(request_ip):
|
||||||
if active:
|
if active:
|
||||||
banned[request_ip] = banned.get(request_ip, 0)
|
banned[request_ip] = banned.get(request_ip, 0)
|
||||||
banned[request_ip] += 1
|
banned[request_ip] += 1
|
||||||
print(banned[request_ip])
|
|
||||||
|
|
||||||
|
|
||||||
def decrease(request_ip):
|
def decrease(request_ip):
|
||||||
if banned[request_ip] > 0:
|
if banned[request_ip] > 0:
|
||||||
banned[request_ip] -= 1
|
banned[request_ip] -= 1
|
||||||
print('decrease', request_ip)
|
|
||||||
|
|
||||||
|
|
||||||
def has_violation(request_ip):
|
def has_violation(request_ip):
|
||||||
|
|
Loading…
Reference in a new issue