feat(lotto): 새 회차 동기화 시 forward+calibration 자동 실행

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 17:20:59 +09:00
parent 3bc4f423db
commit 74f385c7bd

View File

@@ -84,6 +84,13 @@ def on_startup():
if res["was_new"]: if res["was_new"]:
check_results_for_draw(res["drawNo"]) check_results_for_draw(res["drawNo"])
_refresh_perf_cache() # 새 채점 결과 반영 → 즉시 갱신 _refresh_perf_cache() # 새 채점 결과 반영 → 즉시 갱신
# 자가학습 백테스트 — 새 회차 forward 구매 + 당첨조합 캘리브레이션
try:
from . import backtest as _backtest
_backtest.run_forward_purchase(draw_no=res["drawNo"])
_backtest.calibrate_winner(res["drawNo"])
except Exception as e:
logger.warning(f"backtest 갱신 실패: {e}")
scheduler.add_job(_sync_and_check, "cron", hour="9,21", minute=10) scheduler.add_job(_sync_and_check, "cron", hour="9,21", minute=10)