Moving the previous fix to other place...

This commit is contained in:
Frisk 2024-08-29 22:10:30 +02:00
parent 35519a21f5
commit ced5afa39a

View file

@ -214,7 +214,6 @@ class Domain:
if wikis: if wikis:
await self.send_exception_to_monitoring(e, wikis) await self.send_exception_to_monitoring(e, wikis)
self.last_failure_report = time.time() self.last_failure_report = time.time()
await asyncio.sleep(self.calculate_sleep_time(len(self)))
@cache @cache
def calculate_sleep_time(self, queue_length: int): def calculate_sleep_time(self, queue_length: int):
@ -236,6 +235,7 @@ class Domain:
try: try:
while True: while True:
await self.regular_scheduler() await self.regular_scheduler()
await asyncio.sleep(self.calculate_sleep_time(len(self)))
except asyncio.exceptions.CancelledError: except asyncio.exceptions.CancelledError:
for wiki in self.wikis.values(): for wiki in self.wikis.values():
await wiki.session.close() await wiki.session.close()