Исправить обработку крупных результатов worker

This commit is contained in:
2026-11-17 19:24:40 +03:00
parent e8becaf761
commit 3ed3046df1
4 changed files with 64 additions and 5 deletions
+8
View File
@@ -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)