Forward the lab 4 foundation and migrate the lab 5 pipeline to SQLAlchemy

This commit is contained in:
Artyom
2026-11-06 09:12:25 +03:00
parent ae9f60fe1f
commit 1217da5f5e
134 changed files with 8243 additions and 1409 deletions
+3 -1
View File
@@ -74,7 +74,7 @@ async def object_storage(settings: AttachmentsSettings) -> AsyncIterator[ObjectS
yield S3ObjectStorage(client, settings.s3_bucket)
class AttachmentsProvider(Provider):
class AttachmentStorageProvider(Provider):
def __init__(self, settings: AttachmentsSettings) -> None:
super().__init__()
self._settings = settings
@@ -88,6 +88,8 @@ class AttachmentsProvider(Provider):
async with object_storage(settings) as storage:
yield storage
class AttachmentsProvider(AttachmentStorageProvider):
@provide(scope=Scope.APP)
def images(self, settings: AttachmentsSettings) -> ImageInspector:
return PillowImageInspector(settings.max_image_pixels, settings.image_check_concurrency)