forked from mtusi2026/mtusi2026lab7
Перевести пароли на Argon2id и читать секреты через AppRole.
Лимит входа общий для реплик, размер тела ограничен, исходящие клиенты проверяют TLS, если задан CA. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+4
-1
@@ -11,7 +11,7 @@ from starlette.requests import Request
|
||||
from starlette.responses import Response
|
||||
from starlette.routing import Route
|
||||
|
||||
from app import attachments, config, db, jobs, rediscli, telemetry
|
||||
from app import attachments, bao, config, db, jobs, rediscli, telemetry
|
||||
from app.docs import openapi_json, swagger_ui
|
||||
from app.errors import AppError, error_response, from_app_error
|
||||
from app.middleware import RequestContextMiddleware
|
||||
@@ -69,6 +69,9 @@ def publish_instance_id() -> None:
|
||||
async def startup() -> None:
|
||||
publish_instance_id()
|
||||
logging.getLogger("messenger").info("instance_id=%s", config.INSTANCE_ID)
|
||||
await asyncio.to_thread(bao.apply)
|
||||
if config.BAO_ADDR:
|
||||
asyncio.create_task(bao.renew_loop())
|
||||
await db.connect()
|
||||
if config.MIGRATIONS_ON_START:
|
||||
await db.apply_migrations()
|
||||
|
||||
Reference in New Issue
Block a user