feat: improve campus bike discovery and add independent live preview

This commit is contained in:
zzy
2026-11-04 16:42:47 +08:00
parent f986c8deae
commit b6b7b3dbe5
42 changed files with 5267 additions and 4313 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Dedicated preview entry point. Starts no collectors, schedulers or real timers."""
from runtime_mode import PREVIEW_MODE
if not PREVIEW_MODE:
raise RuntimeError("preview_server requires XBNIU_PREVIEW=1")
from app import app
from db import init_db
from preview_data import seed_preview
init_db()
seed_preview()
# Real test accounts use the normal timers and notifications in this isolated database.
from timer import restore_active_timers, start_all_order_checkers
from subscribe import start_subscribe_scheduler
from alerts import start_alert_scheduler
restore_active_timers()
start_all_order_checkers()
start_subscribe_scheduler()
start_alert_scheduler()