feat: Add method to get extractions by status and implement user info retrieval in extraction service
Some checks failed
Backend CI / lint (push) Failing after 4m53s
Backend CI / test (push) Failing after 4m31s

This commit is contained in:
JSC
2025-08-24 13:24:48 +02:00
parent 28faca55bc
commit 16eb789539
5 changed files with 177 additions and 10 deletions

View File

@@ -39,6 +39,15 @@ class ExtractionRepository(BaseRepository[Extraction]):
)
return list(result.all())
async def get_by_status(self, status: str) -> list[Extraction]:
"""Get all extractions by status."""
result = await self.session.exec(
select(Extraction)
.where(Extraction.status == status)
.order_by(Extraction.created_at)
)
return list(result.all())
async def get_pending_extractions(self) -> list[tuple[Extraction, User]]:
"""Get all pending extractions."""
result = await self.session.exec(