Permalink
Browse files

add cluster_id support to ipcluster/launchers

This includes a moderate reorganization of the common launcher args.

start() no longer takes profile_dir, which is now a trait,
as is cluster_id.   This is implemented via small Mixin classes,
consolidating many duplicated controller_cmd/args / engine_cmd/args lines.
  • Loading branch information...
1 parent 4079cf8 commit 8f563c90a24449a0e447824f75c8469d90a3cbfb @minrk committed Sep 15, 2011
Showing with 159 additions and 146 deletions.
  1. +4 −8 IPython/parallel/apps/ipclusterapp.py
  2. +155 −138 IPython/parallel/apps/launcher.py
@@ -295,16 +295,14 @@ def build_launcher(self, clsname):
self.exit(1)
launcher = klass(
- work_dir=u'.', config=self.config, log=self.log
+ work_dir=u'.', config=self.config, log=self.log,
+ profile_dir=self.profile_dir.location, cluster_id=self.cluster_id,
)
return launcher
def start_engines(self):
self.log.info("Starting %i engines"%self.n)
- self.engine_launcher.start(
- self.n,
- self.profile_dir.location
- )
+ self.engine_launcher.start(self.n)
def stop_engines(self):
self.log.info("Stopping Engines...")
@@ -429,9 +427,7 @@ def init_launchers(self):
self.controller_launcher.on_stop(self.stop_launchers)
def start_controller(self):
- self.controller_launcher.start(
- self.profile_dir.location
- )
+ self.controller_launcher.start()
def stop_controller(self):
# self.log.info("In stop_controller")
Oops, something went wrong.

0 comments on commit 8f563c9

Please sign in to comment.