Commit f01f962396f600361bc91f01af2fcc0fb978d383
Exists in
dev
Merge branch 'dev' of https://gitlab.irap.omp.eu/epallier/pyros into dev
Showing
1 changed file
with
13 additions
and
4 deletions
Show diff stats
src/core/pyros_django/agent/Agent.py
... | ... | @@ -328,10 +328,16 @@ class Agent: |
328 | 328 | #PYROS_DEFAULT_GLOBAL_LOG_LEVEL = LogPyros.LOG_LEVEL_INFO # INFO |
329 | 329 | |
330 | 330 | # To be overriden by subclasses (empty by default, no agent specific command) |
331 | + # Format : ("cmd",timeout) with : | |
332 | + # - cmd : the command name | |
333 | + # - timeout : the command timeout (in sec) | |
331 | 334 | AGENT_SPECIFIC_COMMANDS = [ |
332 | - "do_specific1", | |
333 | - "set_specific2", | |
334 | - "do_specific3", | |
335 | + #"do_specific1", | |
336 | + #"set_specific2", | |
337 | + #"do_specific3", | |
338 | + ("do_specific1", 10), | |
339 | + ("set_specific2", 5), | |
340 | + ("do_specific3", 3), | |
335 | 341 | ] |
336 | 342 | |
337 | 343 | # |
... | ... | @@ -2028,7 +2034,10 @@ class Agent: |
2028 | 2034 | ''' |
2029 | 2035 | |
2030 | 2036 | def _is_agent_specific_cmd(self, cmd:AgentCmd): |
2031 | - return cmd.name in self.AGENT_SPECIFIC_COMMANDS | |
2037 | + #return cmd.name in self.AGENT_SPECIFIC_COMMANDS | |
2038 | + #return (cmd.name,) in self.AGENT_SPECIFIC_COMMANDS | |
2039 | + for (cmd_name,timeout) in self.AGENT_SPECIFIC_COMMANDS: | |
2040 | + if cmd.name == cmd_name : return True | |
2032 | 2041 | |
2033 | 2042 | ''' |
2034 | 2043 | def _exec_agent_specific_cmd(self, cmd:Command): | ... | ... |