Island: Register FileAgentLogRegister in DI container

This commit is contained in:
Shreya Malviya 2022-09-28 15:42:07 +05:30
parent 1c6cfa1ce6
commit 01d8875f22
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ from monkey_island.cc.event_queue import IIslandEventQueue, PyPubSubIslandEventQ
from monkey_island.cc.repository import (
AgentBinaryRepository,
FileAgentConfigurationRepository,
FileAgentLogRepository,
FileRepositoryCachingDecorator,
FileRepositoryLockingDecorator,
FileRepositoryLoggingDecorator,
@ -28,6 +29,7 @@ from monkey_island.cc.repository import (
IAgentBinaryRepository,
IAgentConfigurationRepository,
IAgentEventRepository,
IAgentLogRepository,
IAgentRepository,
ICredentialsRepository,
IFileRepository,
@ -117,6 +119,7 @@ def _register_repositories(container: DIContainer, data_dir: Path):
container.register_instance(INodeRepository, container.resolve(MongoNodeRepository))
container.register_instance(IMachineRepository, _build_machine_repository(container))
container.register_instance(IAgentRepository, container.resolve(MongoAgentRepository))
container.register_instance(IAgentLogRepository, container.resolve(FileAgentLogRepository))
def _decorate_file_repository(file_repository: IFileRepository) -> IFileRepository: