mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
[PlacementGroup]Fix placement group wait api disorder bug (#12827)
* [PlacementGroup]Fix placment group wait api disorder bug * fix review comment * fix review comment * fix review comment * fix review comments * increase num_heartbeats_timeout Co-authored-by: 灵洵 <fengbin.ffb@antgroup.com>
This commit is contained in:
@@ -1207,14 +1207,17 @@ cdef class CoreWorker:
|
||||
|
||||
def wait_placement_group_ready(self,
|
||||
PlacementGroupID placement_group_id,
|
||||
int32_t timeout_ms):
|
||||
int32_t timeout_seconds):
|
||||
cdef CRayStatus status
|
||||
cdef CPlacementGroupID cplacement_group_id = (
|
||||
CPlacementGroupID.FromBinary(placement_group_id.binary()))
|
||||
cdef int ctimeout_ms = timeout_ms
|
||||
cdef int ctimeout_seconds = timeout_seconds
|
||||
with nogil:
|
||||
status = CCoreWorkerProcess.GetCoreWorker() \
|
||||
.WaitPlacementGroupReady(cplacement_group_id, ctimeout_ms)
|
||||
.WaitPlacementGroupReady(cplacement_group_id, ctimeout_seconds)
|
||||
if status.IsNotFound():
|
||||
raise Exception("Placement group {} does not exist.".format(
|
||||
placement_group_id))
|
||||
return status.ok()
|
||||
|
||||
def submit_actor_task(self,
|
||||
|
||||
Reference in New Issue
Block a user