Use process reaper for cleanup (#6253)

This commit is contained in:
Edward Oakes
2019-11-26 22:00:08 -06:00
committed by GitHub
parent 8622559e0c
commit e4f9b3b7d9
9 changed files with 172 additions and 53 deletions
+6 -2
View File
@@ -85,7 +85,10 @@ class Cluster(object):
ray_params.update_if_absent(**default_kwargs)
if self.head_node is None:
node = ray.node.Node(
ray_params, head=True, shutdown_at_exit=self._shutdown_at_exit)
ray_params,
head=True,
shutdown_at_exit=self._shutdown_at_exit,
spawn_reaper=self._shutdown_at_exit)
self.head_node = node
self.redis_address = self.head_node.redis_address
self.redis_password = node_args.get("redis_password")
@@ -99,7 +102,8 @@ class Cluster(object):
node = ray.node.Node(
ray_params,
head=False,
shutdown_at_exit=self._shutdown_at_exit)
shutdown_at_exit=self._shutdown_at_exit,
spawn_reaper=self._shutdown_at_exit)
self.worker_nodes.add(node)
# Wait for the node to appear in the client table. We do this so that