Commit 57e671b6dc4888843df5894395077697490a02d2
1 parent
607a7131
Exists in
dev
debut de gestion du timeout dans les commandes specifiques agent
Showing
1 changed file
with
10 additions
and
4 deletions
Show diff stats
src/core/pyros_django/agent/Agent.py
@@ -329,9 +329,12 @@ class Agent: | @@ -329,9 +329,12 @@ class Agent: | ||
329 | 329 | ||
330 | # To be overriden by subclasses (empty by default, no agent specific command) | 330 | # To be overriden by subclasses (empty by default, no agent specific command) |
331 | AGENT_SPECIFIC_COMMANDS = [ | 331 | AGENT_SPECIFIC_COMMANDS = [ |
332 | - "do_specific1", | ||
333 | - "set_specific2", | ||
334 | - "do_specific3", | 332 | + #"do_specific1", |
333 | + #"set_specific2", | ||
334 | + #"do_specific3", | ||
335 | + ("do_specific1",10), | ||
336 | + ("set_specific2",5), | ||
337 | + ("do_specific3",3), | ||
335 | ] | 338 | ] |
336 | 339 | ||
337 | # | 340 | # |
@@ -2028,7 +2031,10 @@ class Agent: | @@ -2028,7 +2031,10 @@ class Agent: | ||
2028 | ''' | 2031 | ''' |
2029 | 2032 | ||
2030 | def _is_agent_specific_cmd(self, cmd:AgentCmd): | 2033 | def _is_agent_specific_cmd(self, cmd:AgentCmd): |
2031 | - return cmd.name in self.AGENT_SPECIFIC_COMMANDS | 2034 | + #return cmd.name in self.AGENT_SPECIFIC_COMMANDS |
2035 | + #return (cmd.name,) in self.AGENT_SPECIFIC_COMMANDS | ||
2036 | + for (cmd_name,timeout) in self.AGENT_SPECIFIC_COMMANDS: | ||
2037 | + if cmd.name == cmd_name : return True | ||
2032 | 2038 | ||
2033 | ''' | 2039 | ''' |
2034 | def _exec_agent_specific_cmd(self, cmd:Command): | 2040 | def _exec_agent_specific_cmd(self, cmd:Command): |