Forward the lab 4 foundation and migrate the lab 5 pipeline to SQLAlchemy
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user