This commit is contained in:
2026-09-27 00:25:40 +03:00
parent 13d3864128
commit 96bbbaf36e
17 changed files with 1533 additions and 786 deletions

8
app.py
View File

@@ -29,10 +29,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
from khl_site.khl_data_center import APP as khl_site_app, configure_storage, sync_storage
from hockey_data.khl_career import KhlCareerService
BASE_DIR = Path(__file__).resolve().parent
BUILD_VERSION = "2026.09.26.4"
BUILD_VERSION = "2026.09.27.1"
# compatibility: BUILD_VERSION = "2026.09.24.2"
# compatibility: BUILD_VERSION = "2026.09.23.8"
# compatibility: BUILD_VERSION = "2026.09.23.7"
@@ -82,6 +83,8 @@ async def hockey_public_health() -> dict[str, Any]:
return {"ok": True, "build": BUILD_VERSION}
hockey_settings = HockeySettingsStore(BASE_DIR / "settings")
hockey_database = HockeyDatabase(BASE_DIR)
hockey_career = KhlCareerService(hockey_database)
configure_storage(hockey_career.import_store)
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)
@@ -89,6 +92,7 @@ hockey_idle_matches = IdleMatchReaper(hockey_database, hockey_agent_hub)
@app.on_event("startup")
async def hockey_mapping_auto_refresh_startup() -> None:
await run_db(sync_storage)
# BUILD151: isolated per-second schedule polling writes only to schedule_live.
await run_db(hockey_service.ensure_schedule_live_table)
await run_db(hockey_agent_hub.mapping_data.ensure_defaults)