diff --git a/monkey/monkey_island/cc/island_event_handlers/__init__.py b/monkey/monkey_island/cc/island_event_handlers/__init__.py index 0f111a31e..11343c2fa 100644 --- a/monkey/monkey_island/cc/island_event_handlers/__init__.py +++ b/monkey/monkey_island/cc/island_event_handlers/__init__.py @@ -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 diff --git a/monkey/monkey_island/cc/setup/island_event_handlers.py b/monkey/monkey_island/cc/setup/island_event_handlers.py index 46429f292..ee37568f1 100644 --- a/monkey/monkey_island/cc/setup/island_event_handlers.py +++ b/monkey/monkey_island/cc/setup/island_event_handlers.py @@ -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)