From 497ff742883b2b2b11f2be6064193b2b9ff7ac77 Mon Sep 17 00:00:00 2001 From: Nicholas Blaskey Date: Wed, 6 Mar 2024 09:26:15 -0500 Subject: [PATCH] fmt changes --- .../scripts/wait_for_perf_migration_upload_results.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/scripts/wait_for_perf_migration_upload_results.py b/.circleci/scripts/wait_for_perf_migration_upload_results.py index f2deed24beb..7e705c14221 100644 --- a/.circleci/scripts/wait_for_perf_migration_upload_results.py +++ b/.circleci/scripts/wait_for_perf_migration_upload_results.py @@ -17,14 +17,18 @@ def _wait_for_master() -> None: print("Checking for master") cert = certs.Cert(noverify=True) sess = api.UnauthSession("http://127.0.0.1:8080", cert) - for _ in range(2 * 60 * 60): + + # 2 hours is the most a migration can take, with this setup. + # If a migration takes longer than that we have hit an issue a customer will likely hit too. + for i in range(2 * 60 * 60): try: r = sess.get("info") if r.status_code == requests.codes.ok: return except api.errors.MasterNotFoundException: pass - print("Waiting for master to be available...") + if i % 60 == 0: + print("Waiting for master to be available...") time.sleep(1) raise ConnectionError("Timed out connecting to Master")