diff --git a/sky/backends/backend_utils.py b/sky/backends/backend_utils.py index de12c20acb9..696320be2f9 100644 --- a/sky/backends/backend_utils.py +++ b/sky/backends/backend_utils.py @@ -2871,7 +2871,7 @@ def check_stale_runtime_on_remote(returncode: int, stderr: str, def wait_and_terminate_csync(cluster_name: str) -> None: - """ Terminatese all the CSYNC process running in each node after + """Terminatese all the CSYNC process running in each node after waiting for the sync process launched by CSYNC complete. Args: diff --git a/sky/data/skystorage.py b/sky/data/skystorage.py index acaa6be663a..06541def710 100644 --- a/sky/data/skystorage.py +++ b/sky/data/skystorage.py @@ -149,10 +149,7 @@ def update_interval(interval_seconds: int, elapsed_time: int): wait before the next sync operation. """ diff = interval_seconds - elapsed_time - if diff <= 0: - return 0 - else: - return diff + return max(0, diff) def get_s3_upload_cmd(src_path: str, dst: str, num_threads: int, delete: bool,