commit
82b99ae803
@ -15,12 +15,12 @@ class Daemon(base.Daemon):
|
|||||||
while True:
|
while True:
|
||||||
bots = platform.platform_client.get_config('bots')
|
bots = platform.platform_client.get_config('bots')
|
||||||
for project_name, project in bots.items():
|
for project_name, project in bots.items():
|
||||||
if project_name not in self.telegram_pollers:
|
if project_name not in self.telegram_bots:
|
||||||
self.telegram_pollers[project_name] = {}
|
self.telegram_bots[project_name] = {}
|
||||||
for bot_name, bot_info in project.items():
|
for bot_name, bot_info in project.items():
|
||||||
if bot_name not in self.telegram_pollers[project_name]:
|
if bot_name not in self.telegram_bots[project_name]:
|
||||||
self.telegram_pollers[project_name][bot_name] = None
|
self.telegram_bots[project_name][bot_name] = None
|
||||||
internal_bot_info = self.telegram_pollers[project_name][bot_name]
|
internal_bot_info = self.telegram_bots[project_name][bot_name]
|
||||||
if bot_info.get('poll_enabled'):
|
if bot_info.get('poll_enabled'):
|
||||||
if internal_bot_info is not None:
|
if internal_bot_info is not None:
|
||||||
bot, thread = internal_bot_info
|
bot, thread = internal_bot_info
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"pizda-bot": {
|
"pizda-bot": {
|
||||||
"telegram-bot": {
|
"telegram-bot": {
|
||||||
"type": "telegram",
|
"type": "telegram",
|
||||||
"poll_enabled": true,
|
"poll_enabled": false,
|
||||||
"mailbox_enabled": false,
|
"mailbox_enabled": false,
|
||||||
"queue": "pizda_bot_worker",
|
"queue": "pizda_bot_worker",
|
||||||
"secrets": {
|
"secrets": {
|
||||||
|
Loading…
Reference in New Issue
Block a user