diff --git a/src/core/pyros_django/dashboard/views.py b/src/core/pyros_django/dashboard/views.py index 7910fb9..18efd98 100644 --- a/src/core/pyros_django/dashboard/views.py +++ b/src/core/pyros_django/dashboard/views.py @@ -204,13 +204,16 @@ def agent_detail(request, agent_name): if not AgentSurvey.objects.get(name=agent_name).is_stopping(): agent_specific_cmds = AgentCmd.send_cmd_from_to("System",agent_name,"get_specific_cmds") wait_time = 0 - max_wait_time = 10 + max_wait_time = 20 unimplemented_command = None - while not AgentCmd.objects.get(id=agent_specific_cmds.id).is_executed() and wait_time <= max_wait_time: + #while not AgentCmd.objects.get(id=agent_specific_cmds.id).is_executed() and wait_time <= max_wait_time: + while not AgentCmd.objects.get(id=agent_specific_cmds.id).is_executed() and not AgentCmd.objects.get(id=agent_specific_cmds.id).is_exec_error(): time.sleep(0.5) + print(AgentCmd.objects.get(id=agent_specific_cmds.id)) wait_time += 0.5 cmd = AgentCmd.objects.get(id=agent_specific_cmds.id) - if cmd.is_unimplemented(): + print(cmd) + if cmd.is_exec_error(): unimplemented_command = cmd.result else: agent_specific_cmd_to_list = cmd.result.split(";") -- libgit2 0.21.2