v1.0.94: lazy schema init — pool.py runs init_db on first DB access, not at import
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user