Island: Register IIslandEventQueue instance in DI container

This commit is contained in:
Shreya Malviya 2022-09-06 17:59:17 +05:30
parent 237f6d01b6
commit 27c8a1019b
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ from common.aws import AWSInstance
from common.common_consts.telem_categories import TelemCategoryEnum
from common.event_queue import IAgentEventQueue, PyPubSubAgentEventQueue
from common.utils.file_utils import get_binary_io_sha256_hash
from monkey.common.event_queue import IIslandEventQueue, PyPubSubIslandEventQueue
from monkey_island.cc.repository import (
AgentBinaryRepository,
FileAgentConfigurationRepository,
@ -64,6 +65,7 @@ def initialize_services(container: DIContainer, data_dir: Path):
)
container.register(Publisher, Publisher)
container.register_instance(IAgentEventQueue, container.resolve(PyPubSubAgentEventQueue))
container.register_instance(IIslandEventQueue, container.resolve(PyPubSubIslandEventQueue))
_register_repositories(container, data_dir)
_register_services(container)