fix: anchor Day N to each round's first game instead of lazy first sighting
The banner read "Day 1 of ~60" on day 2 of the playoffs because the old anchor recorded whatever date we first polled a playoff game as Day 1. Now round start dates come from /v1/schedule/playoff-series, so Day N is authoritative and resets at each round boundary. Drops the noisy "of ~60" denominator. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -4,7 +4,7 @@ import time
|
||||
import schedule
|
||||
|
||||
from app.api import refresh_scores
|
||||
from app.playoff_cache import refresh_bracket
|
||||
from app.playoff_cache import refresh_bracket, refresh_round_start_dates
|
||||
from app.standings import refresh_standings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -14,8 +14,10 @@ def start_scheduler():
|
||||
schedule.every(600).seconds.do(refresh_standings)
|
||||
schedule.every(10).seconds.do(refresh_scores)
|
||||
schedule.every(3600).seconds.do(refresh_bracket)
|
||||
schedule.every(21600).seconds.do(refresh_round_start_dates)
|
||||
# Populate the cache once at startup so the banner has data immediately.
|
||||
refresh_bracket()
|
||||
refresh_round_start_dates()
|
||||
logger.info("Background scheduler started")
|
||||
while True:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user