This commit is contained in:
2026-09-26 23:18:54 +03:00
parent c707c60a35
commit 5c203a0eea
18 changed files with 1558 additions and 56 deletions

6
app.py
View File

@@ -27,11 +27,12 @@ from hockey_data.async_work import run_db
from hockey_data.auth_bridge import HockeyAuthDependencies, create_auth_adapter
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
BASE_DIR = Path(__file__).resolve().parent
BUILD_VERSION = "2026.09.26.2"
BUILD_VERSION = "2026.09.26.3"
# compatibility: BUILD_VERSION = "2026.09.24.2"
# compatibility: BUILD_VERSION = "2026.09.23.8"
# compatibility: BUILD_VERSION = "2026.09.23.7"
@@ -83,6 +84,7 @@ hockey_settings = HockeySettingsStore(BASE_DIR / "settings")
hockey_database = HockeyDatabase(BASE_DIR)
hockey_auth = HockeyAuthDependencies(create_auth_adapter(hockey_database))
hockey_agent_hub = VmixAgentHub(hockey_database, settings=hockey_settings)
hockey_idle_matches = IdleMatchReaper(hockey_database, hockey_agent_hub)
@app.on_event("startup")
@@ -91,6 +93,7 @@ async def hockey_mapping_auto_refresh_startup() -> None:
await run_db(hockey_service.ensure_schedule_live_table)
await run_db(hockey_agent_hub.mapping_data.ensure_defaults)
hockey_agent_hub.start_auto_refresh()
hockey_idle_matches.start()
# 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)
@@ -98,6 +101,7 @@ async def hockey_mapping_auto_refresh_startup() -> None:
@app.on_event("shutdown")
async def hockey_mapping_auto_refresh_shutdown() -> None:
await hockey_idle_matches.stop()
await hockey_agent_hub.stop_auto_refresh()
await hockey_service.stop_schedule_auto_refresh()