Skip to content

Commit

Permalink
Update autoscaler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl authored Nov 22, 2018
1 parent c02eded commit 40a7511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/autoscaler/autoscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def recover_if_needed(self, node_id):
return
key = self.provider.internal_ip(node_id)
if key not in self.load_metrics.last_heartbeat_time_by_ip:
self.load_metrics.last_heartbeat_by_ip = time.time()
self.load_metrics.last_heartbeat_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:
Expand Down

1 comment on commit 40a7511

@mattearllongshot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dict you're assigning to should be called last_heartbeat_time_by_ip not last_heartbeat_by_ip, I believe.

Please sign in to comment.