전체일정 스코어 조정, utc 시간 -> kst 변경

This commit is contained in:
HyeongBaeYang committed 2026-06-11 10:48:16 +09:00
1 parent 7185cfbb72
commit 8a4a23b0cb
9 files changed
+71 -35

No files matched your search

+4 -9
View File
@@ -27,7 +27,7 @@ from sqlalchemy.orm import selectinload
from .config import settings
from .database import SessionLocal, init_db
from .domain import ensure_aware, now_utc
from .domain import compute_phase, ensure_aware, now_utc
from .models import AIPrediction, Match, UserPrediction
from .scoring import load_scoring_data
from .services.ai import MatchContext, PROVIDERS, ProviderUnavailable
@@ -61,14 +61,9 @@ async def tick_status() -> None:
matches = (await db.execute(select(Match))).scalars().all()
changed = 0
for m in matches:
if m.result_outcome is not None:
target = "finished"
elif now >= ensure_aware(m.lock_at):
target = "locked"
elif now >= ensure_aware(m.opens_at):
target = "open"
else:
target = "scheduled"
# 화면용 phase 와 동일 기준으로 status 저장(단일 기준):
# scheduled → open → locked(투표종료) → live(경기중) → finished
target = compute_phase(m, now)
if m.status != target:
m.status = target
changed += 1