@@ -158,12 +158,14 @@ def __init__(self, hosts,
158
158
Either iterating over stdout/stderr or `client.join(output)` will cause exit
159
159
codes to be available in output without explicitly calling `get_exit_codes`.
160
160
161
+ Use ``client.join(output)`` to block until all commands have finished
162
+ and gather exit codes at same time.
163
+
161
164
`client.pool.join()` does not update output and will need a call to
162
165
`get_exit_codes` as shown below.
163
166
164
167
``get_exit_codes`` is not a blocking function and will not wait for commands
165
- to finish. Use ``client.join(output)`` to block until all commands have
166
- finished.
168
+ to finish.
167
169
168
170
``output`` parameter is modified in-place.
169
171
@@ -172,7 +174,7 @@ def __init__(self, hosts,
172
174
>>> ... print output[host]['exit_code']
173
175
0
174
176
0
175
-
177
+
176
178
Print stdout serially per host as it becomes available.
177
179
178
180
>>> for host in output: for line in output[host]['stdout']: print line
@@ -326,7 +328,7 @@ def run_command(self, *args, **kwargs):
326
328
327
329
>>> client.hosts = ['otherhost']
328
330
>>> print client.run_command('exit 0')
329
- >>> {'otherhost': {'exit_code':0 }, <..>}
331
+ >>> {'otherhost': {'exit_code': None }, <..>}
330
332
331
333
**Run multiple commands in parallel**
332
334
0 commit comments