From fe7cc30a15b41134599b3713445bbe6135dbc29a Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Wed, 12 Oct 2022 17:30:55 +0200 Subject: [PATCH] AgentBasic sleep to see all its commands --- privatedev/plugin/agent/AgentBasic.py | 2 +- src/core/pyros_django/agent/Agent.py | 2 ++ src/core/pyros_django/agent/AgentBasic.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/privatedev/plugin/agent/AgentBasic.py b/privatedev/plugin/agent/AgentBasic.py index 920d330..b99c7da 100755 --- a/privatedev/plugin/agent/AgentBasic.py +++ b/privatedev/plugin/agent/AgentBasic.py @@ -215,7 +215,7 @@ class AgentBasic(Agent): def _sleep_as_soon_as_running(self): print("Make agent sleep as soon as a command has started running") print("so that we can see this command in the 'current command' column of agent web pages") - self.sleep(3) + self.sleep(5) # @override def do_things_before_exit(self, stopper_agent_name=None): diff --git a/src/core/pyros_django/agent/Agent.py b/src/core/pyros_django/agent/Agent.py index 61a7f09..178b8c3 100755 --- a/src/core/pyros_django/agent/Agent.py +++ b/src/core/pyros_django/agent/Agent.py @@ -2205,6 +2205,8 @@ class Agent: args.append(arg) cmd.set_as_running() + self._sleep_as_soon_as_running() + try: # equivalent to calling self.func(*cmd.args) return getattr(self, func)(*args) diff --git a/src/core/pyros_django/agent/AgentBasic.py b/src/core/pyros_django/agent/AgentBasic.py index 920d330..b99c7da 100755 --- a/src/core/pyros_django/agent/AgentBasic.py +++ b/src/core/pyros_django/agent/AgentBasic.py @@ -215,7 +215,7 @@ class AgentBasic(Agent): def _sleep_as_soon_as_running(self): print("Make agent sleep as soon as a command has started running") print("so that we can see this command in the 'current command' column of agent web pages") - self.sleep(3) + self.sleep(5) # @override def do_things_before_exit(self, stopper_agent_name=None): -- libgit2 0.21.2