fix(cron): Add backoff

This commit is contained in:
2026-04-29 08:19:41 +02:00
parent cf3f5b1491
commit 773504c908
4 changed files with 25 additions and 13 deletions
+4 -1
View File
@@ -8,6 +8,7 @@ data:
import argparse
import os
import sys
import time
import requests
from datetime import datetime
@@ -86,8 +87,10 @@ data:
if attempt == retries - 1:
print(f"Failed: {filename} -> {e}")
else:
backoff = min(2 ** attempt * 5, 60)
if verbose:
print(f"Retrying {filename}... ({e})")
print(f"Retrying {filename} in {backoff}s... ({e})")
time.sleep(backoff)
def validate_dates(start, end):