per-chan rate limits

This commit is contained in:
2019-09-07 15:31:09 -04:00
parent 589e578473
commit f25d091da8
3 changed files with 27 additions and 14 deletions

4
run.py
View File

@@ -19,7 +19,7 @@ MONITORING = True
class ChanScanner:
def __init__(self, helper):
self.web = Web(monitoring if MONITORING else None)
self.web = Web(monitoring if MONITORING else None, rps=helper.rps)
self.helper = helper
self.state = ChanState()
@@ -140,7 +140,7 @@ class ChanState:
def publish_worker(queue: Queue, helper):
channel = connect()
web = Web(monitoring if MONITORING else None)
web = Web(monitoring if MONITORING else None, rps=helper.rps)
while True:
try: