Show More
@@ -56,7 +56,7 b' from zmq.eventloop import ioloop' | |||||
56 | from IPython.config.application import Application |
|
56 | from IPython.config.application import Application | |
57 | from IPython.config.configurable import LoggingConfigurable |
|
57 | from IPython.config.configurable import LoggingConfigurable | |
58 | from IPython.utils.text import EvalFormatter |
|
58 | from IPython.utils.text import EvalFormatter | |
59 | from IPython.utils.traitlets import Any, Int, List, Unicode, Dict, Instance |
|
59 | from IPython.utils.traitlets import Any, Int, CFloat, List, Unicode, Dict, Instance | |
60 | from IPython.utils.path import get_ipython_module_path |
|
60 | from IPython.utils.path import get_ipython_module_path | |
61 | from IPython.utils.process import find_cmd, pycmd2argv, FindCmdError |
|
61 | from IPython.utils.process import find_cmd, pycmd2argv, FindCmdError | |
62 |
|
62 | |||
@@ -364,6 +364,12 b' class LocalEngineSetLauncher(BaseLauncher):' | |||||
364 | ['--log-to-file','--log-level=%i'%logging.INFO], config=True, |
|
364 | ['--log-to-file','--log-level=%i'%logging.INFO], config=True, | |
365 | help="command-line arguments to pass to ipengine" |
|
365 | help="command-line arguments to pass to ipengine" | |
366 | ) |
|
366 | ) | |
|
367 | delay = CFloat(0.1, config=True, | |||
|
368 | help="""delay (in seconds) between starting each engine after the first. | |||
|
369 | This can help force the engines to get their ids in order, or limit | |||
|
370 | process flood when starting many engines.""" | |||
|
371 | ) | |||
|
372 | ||||
367 | # launcher class |
|
373 | # launcher class | |
368 | launcher_class = LocalEngineLauncher |
|
374 | launcher_class = LocalEngineLauncher | |
369 |
|
375 | |||
@@ -381,6 +387,8 b' class LocalEngineSetLauncher(BaseLauncher):' | |||||
381 | self.profile_dir = unicode(profile_dir) |
|
387 | self.profile_dir = unicode(profile_dir) | |
382 | dlist = [] |
|
388 | dlist = [] | |
383 | for i in range(n): |
|
389 | for i in range(n): | |
|
390 | if i > 0: | |||
|
391 | time.sleep(self.delay) | |||
384 | el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log) |
|
392 | el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log) | |
385 | # Copy the engine args over to each engine launcher. |
|
393 | # Copy the engine args over to each engine launcher. | |
386 | el.engine_args = copy.deepcopy(self.engine_args) |
|
394 | el.engine_args = copy.deepcopy(self.engine_args) | |
@@ -603,6 +611,8 b' class SSHEngineSetLauncher(LocalEngineSetLauncher):' | |||||
603 | else: |
|
611 | else: | |
604 | user=None |
|
612 | user=None | |
605 | for i in range(n): |
|
613 | for i in range(n): | |
|
614 | if i > 0: | |||
|
615 | time.sleep(self.delay) | |||
606 | el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log) |
|
616 | el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log) | |
607 |
|
617 | |||
608 | # Copy the engine args over to each engine launcher. |
|
618 | # Copy the engine args over to each engine launcher. |
General Comments 0
You need to be logged in to leave comments.
Login now