Skip to content

Commit

Permalink
Update check_domains.yml for 5 attempts
Browse files Browse the repository at this point in the history
Increased robustness
  • Loading branch information
glenn-jocher authored Nov 21, 2024
1 parent df557e9 commit 1c1e119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_domains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
import requests
import time
def check_domain_redirection(domain, prefix, max_attempts=3):
def check_domain_redirection(domain, prefix, max_attempts=5):
"""Check if the given domain redirects correctly, with delays between retries."""
valid_destinations = ["ultralytics.com", "yolo11.com"]
url = f"https://{prefix}{domain}"
Expand All @@ -75,7 +75,7 @@ jobs:
for attempt in range(max_attempts):
try:
if attempt > 0:
delay = 2 ** attempt # 2, 4, 8 seconds...
delay = 2 ** attempt # 2, 4, 8, 16, 32 seconds...
time.sleep(delay)
response = requests.get(url, allow_redirects=True, timeout=10)
Expand Down

0 comments on commit 1c1e119

Please sign in to comment.