Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
cblmemo committed Sep 15, 2023
1 parent f465e32 commit c773d70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sky/serve/infra_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,9 @@ def _probe_replica(info: ReplicaInfo) -> Tuple[str, bool]:
if not info.status_property.service_once_ready:
info.status_property.service_once_ready = True
continue
if info.first_not_ready_time is None:
info.first_not_ready_time = time.time()
current_time = time.time()
current_delay_seconds = current_time - info.first_not_ready_time
if info.first_not_ready_time is None:
info.first_not_ready_time = current_time
if info.status_property.service_once_ready:
info.consecutive_failure_times.append(current_time)
consecutive_failure_time = (info.consecutive_failure_times[-1] -
Expand All @@ -647,6 +646,7 @@ def _probe_replica(info: ReplicaInfo) -> Tuple[str, bool]:
f'{_CONSECUTIVE_FAILURE_THRESHOLD_TIMEOUT}s). '
'Skipping.')
else:
current_delay_seconds = current_time - info.first_not_ready_time
if current_delay_seconds > self.initial_delay_seconds:
logger.info(f'Replica {cluster_name} is not ready and '
'exceeding initial delay seconds. '
Expand Down

0 comments on commit c773d70

Please sign in to comment.