shell=True, the end result of that is that at least on linux hosts
passing in a list of arguments to Popen doesn't work very well, Popen
needs a string.
Perhaps a better solution would be for queuecommand to take a
shell parameter and if that's true do the joining into a string.
but for the moment I just converted my test case to pass a string
instead of a list.
"""
Run everything at once
"""
- cmds = [['/bin/sleep', '0'],
- ['/bin/sleep', '1'],
- ['/bin/sleep', '2'],]
+ cmds = ['/bin/sleep 0',
+ '/bin/sleep 1',
+ '/bin/sleep 2',]
q = QueueCommands(cmds)
start = time.time()
"""
Run a limited number of jobs
"""
- cmds = [['/bin/sleep', '1'],
- ['/bin/sleep', '2'],
- ['/bin/sleep', '3'],]
+ cmds = ['/bin/sleep 1',
+ '/bin/sleep 2',
+ '/bin/sleep 3',]
q = QueueCommands(cmds, 2)