Перенести реализацию мессенджера из lab6 в skeleton lab7.

Контракт, публичные тесты и README задания оставлены от lab7.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-26 19:23:53 +03:00
co-authored by Cursor
parent 20afc2c790
commit 54b4b9e509
61 changed files with 5879 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
"""One-shot schema apply. API replicas do not run this on startup."""
import asyncio
import logging
import sys
from app import config, db
async def _main() -> None:
if not config.DATABASE_URL:
raise SystemExit("DATABASE_URL is not set")
await db.connect()
try:
await db.apply_migrations()
finally:
await db.close()
def main() -> None:
logging.basicConfig(
level=getattr(logging, config.LOG_LEVEL.upper(), logging.INFO),
format="%(asctime)s %(levelname)s %(name)s %(message)s",
stream=sys.stdout,
)
asyncio.run(_main())
if __name__ == "__main__":
main()