Исправить обработку крупных результатов worker
This commit is contained in:
@@ -84,6 +84,14 @@ class JobRepository:
|
||||
)
|
||||
)
|
||||
|
||||
async def failed_staging_key(self, job_id: UUID) -> str | None:
|
||||
async with self._sessions() as session:
|
||||
return await session.scalar(
|
||||
select(AttachmentRow.staging_key)
|
||||
.join(AttachmentJobRow, AttachmentJobRow.attachment_id == AttachmentRow.id)
|
||||
.where(AttachmentJobRow.id == job_id, AttachmentJobRow.state == 'failed')
|
||||
)
|
||||
|
||||
async def ready_effect_complete(self, job_id: UUID) -> bool:
|
||||
async with self._sessions() as session:
|
||||
job = await session.get(AttachmentJobRow, job_id)
|
||||
|
||||
Reference in New Issue
Block a user