Files
xbcr/preview_server.py

22 lines
667 B
Python

"""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()