A-0.1 - Modularer Aufbau #13

Merged
edraft merged 118 commits from 0.1 into Alpha 2021-11-25 21:02:12 +01:00
Showing only changes of commit 00a0c182be - Show all commits

View File

@ -30,7 +30,6 @@ class ModuleService(ModuleServiceABC):
self._logger.debug(__name__, 'Start on_ready modules') self._logger.debug(__name__, 'Start on_ready modules')
modules = self._modules.where(lambda m: issubclass(m, OnReadyABC)) modules = self._modules.where(lambda m: issubclass(m, OnReadyABC))
for module_type in modules: for module_type in modules:
module_type = module_type
module: OnReadyABC = self._services.get_service(module_type) module: OnReadyABC = self._services.get_service(module_type)
await module.on_ready() await module.on_ready()
self._logger.debug(__name__, 'Stopped on_ready modules') self._logger.debug(__name__, 'Stopped on_ready modules')
@ -46,7 +45,6 @@ class ModuleService(ModuleServiceABC):
self._logger.debug(__name__, 'Start on_message modules') self._logger.debug(__name__, 'Start on_message modules')
modules = self._modules.where(lambda m: issubclass(m, OnMessageABC)) modules = self._modules.where(lambda m: issubclass(m, OnMessageABC))
for module_type in modules: for module_type in modules:
module_type = module_type
module: OnMessageABC = self._services.get_service(module_type) module: OnMessageABC = self._services.get_service(module_type)
await module.on_message(message) await module.on_message(message)
self._logger.debug(__name__, f'Stopped on_message modules') self._logger.debug(__name__, f'Stopped on_message modules')