Island: Subscribe ISimulationRepository.set_mode to IslandEventTopic.SET_ISLAND_MODE

This commit is contained in:
Shreya Malviya 2022-09-21 18:02:07 +05:30
parent add31fe397
commit 547637d151
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,3 @@
from .reset_agent_configuration import reset_agent_configuration
from .reset_machine_repository import reset_machine_repository
from .set_agent_configuration_per_island_mode import set_agent_configuration_per_island_mode
from .set_simulation_mode import set_simulation_mode

View File

@ -6,13 +6,13 @@ from monkey_island.cc.island_event_handlers import (
reset_agent_configuration,
reset_machine_repository,
set_agent_configuration_per_island_mode,
set_simulation_mode,
)
from monkey_island.cc.repository import (
IAgentEventRepository,
IAgentRepository,
ICredentialsRepository,
INodeRepository,
ISimulationRepository,
)
from monkey_island.cc.services.database import Database
@ -62,4 +62,5 @@ def _subscribe_set_island_mode_events(
island_event_queue.subscribe(topic, container.resolve(set_agent_configuration_per_island_mode))
island_event_queue.subscribe(topic, container.resolve(set_simulation_mode))
simulation_repository = container.resolve(ISimulationRepository)
island_event_queue.subscribe(topic, simulation_repository.set_mode)