Интегрирован wesp в сайт
CI / quality (push) Canceled after 0s

This commit is contained in:
влад
2026-07-17 12:57:18 +03:00
parent 5dfa06ddbe
commit 355c0ef9f1
883 changed files with 194576 additions and 177 deletions
+31
View File
@@ -0,0 +1,31 @@
"""
WSGI entrypoint (gunicorn, uwsgi и т.д.).
Перед импортом приложения выставляет WESP_CONFIG=production, если не задано —
чтобы конфиг совпал с ожидаемым для боевого деплоя (в т.ч. с Alembic).
"""
import atexit
import os
import wesp_runtime_env
wesp_runtime_env.apply_kiosk_headless_env()
os.environ.setdefault("WESP_CONFIG", "production")
from app import create_app
from app.runtime_services import schedule_runtime_services
app = create_app()
if not app.config.get("TESTING"):
from app.services.mdns_service import register_mdns_shutdown
from app.services.startup_background import register_post_ready_callback
register_mdns_shutdown(app)
if app.config.get("WESP_DEFERRED_STARTUP"):
register_post_ready_callback(schedule_runtime_services)
else:
schedule_runtime_services(app)