Added PyCharm support to boot-log module
This commit is contained in:
parent
0c142f51cc
commit
d83e842551
@ -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:
|
||||
|
@ -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()))
|
||||
|
Reference in New Issue
Block a user