Added PyCharm support to boot-log module

This commit is contained in:
Sven Heidemann 2022-01-08 19:08:13 +01:00
parent 0c142f51cc
commit d83e842551
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class BootLog(ModuleABC, OnReadyABC):
try:
start_time = self._config.get_configuration('Bot_StartTime')
init_time = round((datetime.now() - start_time).total_seconds(), 2)
self._config.add_configuration('InitTime', init_time)
self._config.add_configuration('InitTime', str(init_time))
self._logger.debug(__name__, f'Bot Init time: {init_time}s')
# print warning if initialisation took too long
if init_time >= 30:

View File

@ -14,4 +14,4 @@ class BootLogExtension(ApplicationExtensionABC):
async def run(self, config: ConfigurationABC, services: ServiceProviderABC):
logger: LoggerABC = services.get_service(LoggerABC)
logger.debug(__name__, 'BootLog extension started')
config.add_configuration('Bot_StartTime', datetime.now())
config.add_configuration('Bot_StartTime', str(datetime.now()))