ЛР 7: безопасность, mTLS и OpenBao на оценку 3

This commit is contained in:
2026-12-06 15:19:24 +03:00
parent 20afc2c790
commit 280c5a3300
101 changed files with 5950 additions and 63 deletions
+29
View File
@@ -0,0 +1,29 @@
import asyncio
import sys
from uuid import UUID
from app.worker import async_session_maker, engine
from app.models.attachment import Attachment
async def main():
attachment_id = UUID(sys.argv[1])
try:
async with async_session_maker() as session:
att = await session.get(Attachment, attachment_id)
if att is None:
print("Attachment not found")
return
print("Attachment ID:", att.id)
print("Status:", att.status)
print("Error code:", att.error_code)
finally:
await engine.dispose()
if __name__ == "__main__":
asyncio.run(main())