-
Hi. I'm a complete newbie to this library and am noticing that when I have a host that's unreachable in my hosts list it takes a while to time out. I'd like to set a very short connect timeout and then use a longer timeout for the commands that I issue to be run on the remote machines. I don't see this capability in the documented API. If this library doesn't have that capability but you see the rough area in the code where it'd make sense to add feel free to point me to there and maybe I'll code it up and submit a pull request. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, Thanks for the interest. That is already possible via, for example:
The above should cause connection attempts to timeout in one second and wait for successful remote commands (ie, excluding ones that timed out) to finish for up to sixty seconds. Read timeout, as in reading from Can you show example code of what you are trying to do, if not covered by the above. |
Beta Was this translation helpful? Give feedback.
Hi,
Thanks for the interest.
That is already possible via, for example:
The above should cause connection attempts to timeout in one second and wait for successful remote commands (ie, excluding ones that timed out) to finish for up to sixty seconds.
Read timeout, as in reading from
stdout/stderr
, is separate and can be set viarun_command(<..>, read_timeout=N)
. It is per stream, meaning separate timeout for each of stdout/stderr on each host whereas join timeout is cumulative for all remote commands.Can you show example code of what you are trying to do, if not covered by …