forked from p34709852/monkey
Island: 'kill_time' -> 'terminate_time'
This commit is contained in:
parent
fbfebc6167
commit
489ead31d2
|
@ -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")
|
||||
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue