Skip to content

Commit

Permalink
Improve retry logic (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Aug 15, 2024
1 parent 406626a commit f2df3da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion codecov-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
if data["head_totals"] is not None:
head_cov = data["head_totals"]["coverage"]
delta_coverage = head_cov - base_cov
if updatestamp > start_time:
# It can happen for updatestamp to be updated but head_totals to become
# None for some time, so we keep retrying until we have something.
if updatestamp > start_time and head_cov:
break
retries += 1
sleep = DELAY * (retries + 1)
Expand Down

0 comments on commit f2df3da

Please sign in to comment.