Skip to content

Commit f568e30

Browse files
author
Dan
committed
WIP for #25
1 parent 6bebfe4 commit f568e30

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pssh.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ def run_command(self, *args, **kwargs):
489489
'cmd' : <greenlet>}}
490490
491491
"""
492-
for host in self.hosts:
493-
self.pool.spawn(self._exec_command, host, *args, **kwargs)
494-
return self.get_output()
492+
cmds = [self.pool.spawn(self._exec_command, host, *args, **kwargs)
493+
for host in self.hosts]
494+
return self.get_output(commands=cmds)
495495

496496
def exec_command(self, *args, **kwargs):
497497
"""Run command on all hosts in parallel, honoring `self.pool_size`

tests/test_pssh_client.py

+5
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ def test_pssh_pool_size(self):
311311
msg="Expected pool size to be %s, got %s" % (
312312
expected, actual,))
313313

314+
def test_pssh_hosts_more_than_pool_size(self):
315+
"""Test we can successfully run on more hosts than our pool size and
316+
get logs for all hosts"""
317+
raise NotImplementedError
318+
314319
def test_ssh_proxy(self):
315320
"""Test connecting to remote destination via SSH proxy
316321
client -> proxy -> destination

0 commit comments

Comments
 (0)