ЛР7 - БВТ2302 - Зюлина - на 3
Skeleton contracts / contracts (pull_request) Blocked by required conditions

This commit is contained in:
2026-11-29 12:55:09 +03:00
parent 20afc2c790
commit 5b8c2a22e1
54 changed files with 2781 additions and 94 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
python - <<'PY'
import os
import time
from sqlalchemy import create_engine, text
if os.getenv("MIGRATION_CONTEXT") == "1":
engine = create_engine(os.environ["DATABASE_URL"], connect_args={
"connect_timeout": 3,
"sslmode": "verify-full",
"sslrootcert": os.getenv("DB_CA_FILE", "/run/tls/service-ca.crt"),
})
else:
# Uses this service's scoped AppRole KV path and verifies the DB TLS identity.
from src.database import engine
for attempt in range(60):
try:
with engine.connect() as connection:
connection.execute(text("SELECT 1"))
break
except Exception:
if attempt == 59:
raise
time.sleep(1)
PY
exec "$@"