Soft-fail OpenDota hero stats/matches on daily rate limits.

Keep restored cache and continue the tier so a burned runner IP cannot
block leaderboards, pro-match rotation, or streamer refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-30 23:02:35 +08:00
co-authored by Cursor
parent 0f7e7b68dd
commit f035e2c233
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
### Changed
- 上分帝 Web 每日刷新明星比赛改为按 `fetched_at` 轮换(默认每次 15 人),遇 OpenDota 连续 429 熔断并保留旧缓存,避免整档 daily 被限流拖死。
- 上分帝 Web 每日刷新明星比赛改为按 `fetched_at` 轮换(默认每次 15 人),遇 OpenDota 连续 429 熔断并保留旧缓存`hero_stats` / `hero_matches` 限流时 soft-fail 保留缓存,避免整档 daily 被拖死。
### Removed
+9 -2
View File
@@ -272,9 +272,16 @@ def run_patch_linked(*, dry_run: bool = False) -> None:
def run_daily(*, dry_run: bool = False) -> bool:
"""Return True if patch-linked fetch ran."""
run_script("fetch_hero_stats.py", dry_run=dry_run)
# Soft-fail OpenDota quota burns: keep restored cache and continue the tier.
run_script("fetch_hero_stats.py", dry_run=dry_run, soft_fail=True)
run_script("fetch_leaderboards.py", dry_run=dry_run)
run_script("fetch_hero_matches.py", "--source", "league", dry_run=dry_run)
run_script(
"fetch_hero_matches.py",
"--source",
"league",
dry_run=dry_run,
soft_fail=True,
)
run_script(
"fetch_pro_matches.py",
"--include-pubs",