Skip to content

Commit

Permalink
untested revive_node() Python call
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-castellon committed Jun 3, 2024
1 parent eaa9266 commit 392aa33
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions python/babyray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@ def kill_node(node_id):
node_worker_gRPC.KillServer(rayclient_pb2.StatusResponse())


def revive_node(node_id):
# revive node node_id

local_scheduler_channel = grpc.insecure_channel(
f"node{node_id}:{str(LOCAL_SCHEDULER_PORT)}"
)
node_local_scheduler_gRPC = rayclient_pb2_grpc.LocalSchedulerStub(
local_scheduler_channel
)

worker_channel = grpc.insecure_channel(
f"node{node_id}:{str(LOCAL_WORKER_PORT_START)}"
)

node_worker_gRPC = rayclient_pb2_grpc.WorkerStub(worker_channel)

node_local_scheduler_gRPC.ReviveServer(rayclient_pb2.StatusResponse())
node_worker_gRPC.ReviveServer(rayclient_pb2.StatusResponse())


def demo():
# Example function to simulate Ray's behavior
@remote
Expand Down

0 comments on commit 392aa33

Please sign in to comment.