master #16

Merged
emmatveev merged 15 commits from master into prod 2024-11-27 18:44:05 +03:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit f80b147a5b - Show all commits

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": {