Rotate OpenDota pro-match refresh to stay under rate limits.

Daily now refreshes the 15 oldest watchlist pros, keeps prior cache for the
rest, fails fast on consecutive 429s, and still writes a partial result.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-30 22:59:34 +08:00
co-authored by Cursor
parent 3b7d00b32b
commit 0f7e7b68dd
5 changed files with 420 additions and 22 deletions
+7 -1
View File
@@ -275,7 +275,13 @@ def run_daily(*, dry_run: bool = False) -> bool:
run_script("fetch_hero_stats.py", dry_run=dry_run)
run_script("fetch_leaderboards.py", dry_run=dry_run)
run_script("fetch_hero_matches.py", "--source", "league", dry_run=dry_run)
run_script("fetch_pro_matches.py", "--include-pubs", dry_run=dry_run)
run_script(
"fetch_pro_matches.py",
"--include-pubs",
"--refresh-limit",
"15",
dry_run=dry_run,
)
# Soft-fail Douyin enrichment (script itself exits 0; keep previous values on miss).
run_script("fetch_streamers.py", dry_run=dry_run, soft_fail=True)
# Soft-fail live probe (exits 0; probe failures clear is_live / live_probed_at).