From ef273bc1cfe9f6939ad8a48b1fcc9f98cfa158a3 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 23 Sep 2022 12:02:27 +0530 Subject: [PATCH] Island: Remove set_stop_all() --- .../monkey_island/cc/services/infection_lifecycle.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/monkey/monkey_island/cc/services/infection_lifecycle.py b/monkey/monkey_island/cc/services/infection_lifecycle.py index 937a3abeb..e1e3a831e 100644 --- a/monkey/monkey_island/cc/services/infection_lifecycle.py +++ b/monkey/monkey_island/cc/services/infection_lifecycle.py @@ -12,16 +12,6 @@ from monkey_island.cc.services.reporting.report_generation_synchronisation impor logger = logging.getLogger(__name__) -def set_stop_all(time: float): - # This will use Agent and Simulation repositories - for monkey in Monkey.objects(): - monkey.should_stop = True - monkey.save() - agent_controls = AgentControls.objects.first() - agent_controls.last_stop_all = time - agent_controls.save() - - def should_agent_die(guid: int) -> bool: monkey = Monkey.objects(guid=str(guid)).first() return _should_agent_stop(monkey) or _is_monkey_killed_manually(monkey)