Improved bot startup logic

This commit is contained in:
2021-11-16 18:34:41 +01:00
parent 2176037d08
commit d2c233a855
12 changed files with 80 additions and 24 deletions

View File

@@ -5,7 +5,6 @@ from cpl_core.logging import LoggerABC
from gismo_core.abc.bot_service_abc import BotServiceABC
from gismo_core.service.bot_service import BotService
from modules_core.abc.module_service_abc import ModuleServiceABC
class Application(ApplicationABC):
@@ -23,5 +22,6 @@ class Application(ApplicationABC):
try:
self._logger.trace(__name__, f'Try to start {BotService}')
await self._bot.start_async()
self._logger.trace(__name__, f'Stopped {BotService}')
except Exception as e:
self._logger.error(__name__, 'Start failed', e)