cmvr-visual/backend/app/core/maintenance.py
zhanghao 88cf14d794 feat: consolidate story studio and editable automatic production
Restructure backend and frontend modules; add story, library, and editor schema migrations.

Support editable automatic production, manual confirmation modes, account and user lifecycle management, compact container scrolling, consistent forms, and per-task result previews.

Update inference and TTS scheduling, deployment guidance, and regression coverage; remove obsolete standalone pages and temporary acceptance artifacts.
2026-11-14 14:07:26 +08:00

14 lines
380 B
Python

"""Server-owned admission switch. Reads, synchronization and archival continue."""
from pathlib import Path
from app.core.errors import fail
def maintenance_active(settings):
return (Path(settings.state_root) / "maintenance").exists()
def require_writable(settings):
if maintenance_active(settings):
fail(503, "maintenance", "Service is in maintenance mode")