172 build - обновленно чтение данных с сайта КХЛ

173 build - sql запросы сокрещенны
This commit is contained in:
2026-09-29 13:51:57 +03:00
parent 7cab462b09
commit 299df602db
8 changed files with 1043 additions and 176 deletions

7
app.py
View File

@@ -31,11 +31,11 @@ from hockey_data.auth_router import create_hockey_auth_router
from hockey_data.agent_bridge import VmixAgentHub, create_hockey_agent_router
from hockey_data.idle_matches import IdleMatchReaper
from ui_builder import install_ui_builder
from khl_site.khl_data_center import APP as khl_site_app, configure_storage, sync_storage
from khl_site.khl_data_center import APP as khl_site_app, configure_storage, sync_storage, SCHEDULER as khl_update_scheduler
from hockey_data.khl_career import KhlCareerService
BASE_DIR = Path(__file__).resolve().parent
BUILD_VERSION = "2026.09.29.8"
BUILD_VERSION = "2026.09.29.10"
# compatibility: BUILD_VERSION = "2026.09.24.2"
# compatibility: BUILD_VERSION = "2026.09.23.8"
# compatibility: BUILD_VERSION = "2026.09.23.7"
@@ -187,13 +187,16 @@ async def hockey_mapping_auto_refresh_startup() -> None:
# BUILD143: schedules, standings and authoritative per-game scores refresh
# on the server even when no browser/operator is open.
hockey_service.start_schedule_auto_refresh(interval_seconds=3600)
khl_update_scheduler.start()
@app.on_event("shutdown")
async def hockey_mapping_auto_refresh_shutdown() -> None:
khl_update_scheduler.stop()
await hockey_idle_matches.stop()
await hockey_agent_hub.stop_auto_refresh()
await hockey_service.stop_schedule_auto_refresh()
await hockey_service.stop_live_refreshes()
@app.middleware("http")