Files
NHL-Scoreboard/app/scoreboard/tasks.py
josh 3994943757
Some checks failed
CI / Lint (push) Successful in 58s
CI / Test (push) Successful in 8s
CI / Build & Push (push) Failing after 1m33s
good luck
2026-03-29 09:20:21 -04:00

19 lines
468 B
Python

import logging
import time
import schedule
from app.scoreboard.get_data import store_scoreboard_data
from app.scoreboard.update_nhl_standings_db import update_nhl_standings
logger = logging.getLogger(__name__)
def schedule_tasks():
schedule.every(600).seconds.do(update_nhl_standings)
schedule.every(10).seconds.do(store_scoreboard_data)
logger.info("Background scheduler started")
while True:
schedule.run_pending()
time.sleep(1)