fix
All checks were successful
Deploy Dev / Build (pull_request) Successful in 4s
Deploy Dev / Push (pull_request) Successful in 7s
Deploy Dev / Deploy dev (pull_request) Successful in 11s

This commit is contained in:
emmatveev 2024-11-27 11:12:11 +03:00
parent e0db9bb605
commit f80b147a5b
2 changed files with 6 additions and 6 deletions

View File

@ -15,12 +15,12 @@ class Daemon(base.Daemon):
while True:
bots = platform.platform_client.get_config('bots')
for project_name, project in bots.items():
if project_name not in self.telegram_pollers:
self.telegram_pollers[project_name] = {}
if project_name not in self.telegram_bots:
self.telegram_bots[project_name] = {}
for bot_name, bot_info in project.items():
if bot_name not in self.telegram_pollers[project_name]:
self.telegram_pollers[project_name][bot_name] = None
internal_bot_info = self.telegram_pollers[project_name][bot_name]
if bot_name not in self.telegram_bots[project_name]:
self.telegram_bots[project_name][bot_name] = None
internal_bot_info = self.telegram_bots[project_name][bot_name]
if bot_info.get('poll_enabled'):
if internal_bot_info is not None:
bot, thread = internal_bot_info

View File

@ -4,7 +4,7 @@
"pizda-bot": {
"telegram-bot": {
"type": "telegram",
"poll_enabled": true,
"poll_enabled": false,
"mailbox_enabled": false,
"queue": "pizda_bot_worker",
"secrets": {