fix
This commit is contained in:
parent
f80b147a5b
commit
2eee8bc1fa
@ -31,7 +31,7 @@ class Daemon(base.Daemon):
|
|||||||
thread = threading.Thread(target=self.start_polling, args=[bot, bot_info['queue']])
|
thread = threading.Thread(target=self.start_polling, args=[bot, bot_info['queue']])
|
||||||
print(f'starting process for {project_name} {bot_name}')
|
print(f'starting process for {project_name} {bot_name}')
|
||||||
thread.start()
|
thread.start()
|
||||||
self.telegram_pollers[project_name][bot_name] = (bot, thread)
|
self.telegram_bots[project_name][bot_name] = (bot, thread)
|
||||||
print(f'started process for {project_name} {bot_name}')
|
print(f'started process for {project_name} {bot_name}')
|
||||||
else:
|
else:
|
||||||
if internal_bot_info is None or not internal_bot_info[1].is_alive:
|
if internal_bot_info is None or not internal_bot_info[1].is_alive:
|
||||||
@ -39,7 +39,7 @@ class Daemon(base.Daemon):
|
|||||||
continue
|
continue
|
||||||
print(f'terminating process for {project_name} {bot_name}')
|
print(f'terminating process for {project_name} {bot_name}')
|
||||||
internal_bot_info[0].stop_bot()
|
internal_bot_info[0].stop_bot()
|
||||||
self.telegram_pollers[project_name][bot_name] = None
|
self.telegram_bots[project_name][bot_name] = None
|
||||||
print(f'terminated process for {project_name} {bot_name}')
|
print(f'terminated process for {project_name} {bot_name}')
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"pizda-bot": {
|
"pizda-bot": {
|
||||||
"telegram-bot": {
|
"telegram-bot": {
|
||||||
"type": "telegram",
|
"type": "telegram",
|
||||||
"poll_enabled": false,
|
"poll_enabled": true,
|
||||||
"mailbox_enabled": false,
|
"mailbox_enabled": false,
|
||||||
"queue": "pizda_bot_worker",
|
"queue": "pizda_bot_worker",
|
||||||
"secrets": {
|
"secrets": {
|
||||||
|
Loading…
Reference in New Issue
Block a user