v1.0.94: lazy schema init — pool.py runs init_db on first DB access, not at import

This commit is contained in:
2026-07-28 09:56:44 +04:00
parent 203c12638d
commit 163dd02419
2 changed files with 15 additions and 5 deletions
-5
View File
@@ -24,11 +24,6 @@ app = Flask(__name__, template_folder="templates", static_folder="static")
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
app.config["NUBES_API_TOKEN"] = os.getenv("NUBES_API_TOKEN", "")
app.config["VERSION"] = VERSION
# Инициализация схемы БД (идемпотентно, безопасно для нескольких воркеров)
from db.init_db import init_db
init_db()
app.register_blueprint(main_bp)
app.register_blueprint(api_bp)
app.register_blueprint(api_test_bp)