fix(stars_bot): correct async gathering and interval config
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
from concurrent.futures import thread
|
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ class TelegramStarsBot:
|
|||||||
else:
|
else:
|
||||||
logger.info("Тему нельзя поднять.")
|
logger.info("Тему нельзя поднять.")
|
||||||
|
|
||||||
logger.info(f"Ожидание {self.config.check_interval} секунд...")
|
logger.info(f"Ожидание {self.config.bump_check_interval} секунд...")
|
||||||
await asyncio.sleep(self.config.bump_check_interval)
|
await asyncio.sleep(self.config.bump_check_interval)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
@@ -373,7 +373,7 @@ class TelegramStarsBot:
|
|||||||
|
|
||||||
# _main_loop - Основной цикл для остлеживания темы
|
# _main_loop - Основной цикл для остлеживания темы
|
||||||
# _bump_look - Цикл для авто-поднятия темы
|
# _bump_look - Цикл для авто-поднятия темы
|
||||||
await asyncio.gather(await self._main_loop(), await self._bump_loop())
|
await asyncio.gather(self._main_loop(), self._bump_loop())
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
if self.client and self.client.is_connected:
|
if self.client and self.client.is_connected:
|
||||||
|
|||||||
Reference in New Issue
Block a user