Island: 'kill_time' -> 'terminate_time'

This commit is contained in:
Shreya Malviya 2022-09-23 18:06:28 +05:30 committed by Mike Salvatore
parent fbfebc6167
commit 489ead31d2
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ class AgentSignals(AbstractResource):
def post(self):
try:
terminate_timestamp = request.json["kill_time"]
terminate_timestamp = request.json["terminate_time"]
if terminate_timestamp is None:
raise ValueError("Terminate signal's timestamp is empty")

View File

@ -27,14 +27,14 @@ def _should_agent_stop(monkey: Monkey) -> bool:
def _is_monkey_killed_manually(monkey: Monkey) -> bool:
kill_timestamp = AgentControls.objects.first().last_stop_all
if kill_timestamp is None:
terminate_timestamp = AgentControls.objects.first().last_stop_all
if terminate_timestamp is None:
return False
if monkey.has_parent():
launch_timestamp = monkey.get_parent().launch_time
else:
launch_timestamp = monkey.launch_time
return int(kill_timestamp) >= int(launch_timestamp)
return int(terminate_timestamp) >= int(launch_timestamp)
def get_completed_steps():