diff --git a/monkey/monkey_island/cc/services/agent_signals_service.py b/monkey/monkey_island/cc/services/agent_signals_service.py index 23a15dba9..473a10066 100644 --- a/monkey/monkey_island/cc/services/agent_signals_service.py +++ b/monkey/monkey_island/cc/services/agent_signals_service.py @@ -1,10 +1,13 @@ +import logging from datetime import datetime from typing import Optional from common.types import AgentID -from monkey_island.cc.models import AgentSignals +from monkey_island.cc.models import AgentSignals, Simulation from monkey_island.cc.repository import IAgentRepository, ISimulationRepository +logger = logging.getLogger(__name__) + class AgentSignalsService: def __init__( @@ -45,4 +48,7 @@ class AgentSignalsService: :param timestamp: Timestamp of the terminate signal """ - pass + simulation = self._simulation_repository.get_simulation() + updated_simulation = Simulation(mode=simulation.mode, terminate_signal_time=timestamp) + + self._simulation_repository.save_simulation(updated_simulation)