INNER CODE UNIT · Python
i
wolfSSL/wolfssl-examples · .github/scripts/ci_triage.py:60
if i == attempts - 1:
raise
time.sleep(2 ** i)
def all_jobs(run_id, attempt=None):
base = f"/repos/{REPO}/actions/runs/{run_id}"
base += f"/attempts/{attempt}/jobs" if attempt else "/jobs"
jobs, page = [], 1
while True:
got = gh(f"{base}?per_page={JOBS_PER_PAGE}&page={page}").get("jobs", [])
jobs += got
if len(got) < JOBS_PER_PAGE:
return jobs
page += 1
# --- retry: poll, do not trampoline ----------------------------------------