diff --git a/src/domain.py b/src/domain.py index b5b05ef..8d38cbb 100644 --- a/src/domain.py +++ b/src/domain.py @@ -214,7 +214,6 @@ class Domain: if wikis: await self.send_exception_to_monitoring(e, wikis) self.last_failure_report = time.time() - await asyncio.sleep(self.calculate_sleep_time(len(self))) @cache def calculate_sleep_time(self, queue_length: int): @@ -236,6 +235,7 @@ class Domain: try: while True: await self.regular_scheduler() + await asyncio.sleep(self.calculate_sleep_time(len(self))) except asyncio.exceptions.CancelledError: for wiki in self.wikis.values(): await wiki.session.close()