refactor: remove cron cache refresh, enforce lazy on-demand update in get_model_rating

This commit is contained in:
2026-10-16 12:10:23 +00:00
parent f81b866e34
commit aa32579c89
2 changed files with 0 additions and 29 deletions
-1
View File
@@ -24,7 +24,6 @@
- `arena_leaderboard.py` — основной CLI и Python API парсера лидерборда. - `arena_leaderboard.py` — основной CLI и Python API парсера лидерборда.
- `omniroute_arena_report.py` — прогон моделей OmniRoute и генерация арена-отчёта. - `omniroute_arena_report.py` — прогон моделей OmniRoute и генерация арена-отчёта.
- `arena_cache_refresh.py` — легковесный скрипт для запуска через cron (обновление кеша раз в сутки).
--- ---
-28
View File
@@ -1,28 +0,0 @@
#!/usr/bin/env python3
"""
arena_cache_refresh.py — cron no_agent job.
Раз в сутки обновляет кеш лидерборда arena.ai (24h TTL).
Silent watchdog: успех = одна короткая строка в лог крона, в чат ничего не летит.
"""
import sys
import traceback
sys.path.insert(0, "/opt/data/skills/research/arena-leaderboard-parser")
try:
from arena_leaderboard import get_leaderboard
except ImportError:
print("FATAL: cannot import arena_leaderboard from "
"/opt/data/skills/research/arena-leaderboard-parser")
sys.exit(1)
try:
lb = get_leaderboard(force_refresh=True)
top1 = lb["models"][0]
print(f"ok: refreshed {lb['total_models']} models (updated {lb['updated']}); "
f"#{top1['rank']} {top1['model']} {top1['score']}; board=text")
except Exception as e:
print(f"FAIL: {type(e).__name__}: {e}")
traceback.print_exc()
# не валимся молча — код 1, чтобы крон пометил run как error
sys.exit(1)