Commit fe7cc30a15b41134599b3713445bbe6135dbc29a

Authored by Etienne Pallier
1 parent 0cc81973
Exists in dev

AgentBasic sleep to see all its commands

privatedev/plugin/agent/AgentBasic.py
@@ -215,7 +215,7 @@ class AgentBasic(Agent): @@ -215,7 +215,7 @@ class AgentBasic(Agent):
215 def _sleep_as_soon_as_running(self): 215 def _sleep_as_soon_as_running(self):
216 print("Make agent sleep as soon as a command has started running") 216 print("Make agent sleep as soon as a command has started running")
217 print("so that we can see this command in the 'current command' column of agent web pages") 217 print("so that we can see this command in the 'current command' column of agent web pages")
218 - self.sleep(3) 218 + self.sleep(5)
219 219
220 # @override 220 # @override
221 def do_things_before_exit(self, stopper_agent_name=None): 221 def do_things_before_exit(self, stopper_agent_name=None):
src/core/pyros_django/agent/Agent.py
@@ -2205,6 +2205,8 @@ class Agent: @@ -2205,6 +2205,8 @@ class Agent:
2205 args.append(arg) 2205 args.append(arg)
2206 2206
2207 cmd.set_as_running() 2207 cmd.set_as_running()
  2208 + self._sleep_as_soon_as_running()
  2209 +
2208 try: 2210 try:
2209 # equivalent to calling self.func(*cmd.args) 2211 # equivalent to calling self.func(*cmd.args)
2210 return getattr(self, func)(*args) 2212 return getattr(self, func)(*args)
src/core/pyros_django/agent/AgentBasic.py
@@ -215,7 +215,7 @@ class AgentBasic(Agent): @@ -215,7 +215,7 @@ class AgentBasic(Agent):
215 def _sleep_as_soon_as_running(self): 215 def _sleep_as_soon_as_running(self):
216 print("Make agent sleep as soon as a command has started running") 216 print("Make agent sleep as soon as a command has started running")
217 print("so that we can see this command in the 'current command' column of agent web pages") 217 print("so that we can see this command in the 'current command' column of agent web pages")
218 - self.sleep(3) 218 + self.sleep(5)
219 219
220 # @override 220 # @override
221 def do_things_before_exit(self, stopper_agent_name=None): 221 def do_things_before_exit(self, stopper_agent_name=None):