mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 08:49:02 +08:00
Use process reaper for cleanup (#6253)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user