mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 12:10:40 +08:00
[autoscaler] Allow more than 5s from node creation to first heartbeat (#3385)
This commit is contained in:
committed by
Robert Nishihara
parent
0f0099fb90
commit
aa94d3dd50
@@ -491,8 +491,10 @@ class StandardAutoscaler(object):
|
||||
def recover_if_needed(self, node_id):
|
||||
if not self.can_update(node_id):
|
||||
return
|
||||
last_heartbeat_time = self.load_metrics.last_heartbeat_time_by_ip.get(
|
||||
self.provider.internal_ip(node_id), 0)
|
||||
key = self.provider.internal_ip(node_id)
|
||||
if key not in self.load_metrics.last_heartbeat_time_by_ip:
|
||||
self.load_metrics.last_heartbeat_time_by_ip[key] = time.time()
|
||||
last_heartbeat_time = self.load_metrics.last_heartbeat_time_by_ip[key]
|
||||
delta = time.time() - last_heartbeat_time
|
||||
if delta < AUTOSCALER_HEARTBEAT_TIMEOUT_S:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user