b5a62ee9a3
- domain: User, Workspace, Project, AssetLibrary, Asset, IngestJob - ports: repository interfaces - application: use cases - adapters: in-memory - API: FastAPI 5 routes - worker: Celery ingest_asset - tests: 4 passing
17 lines
443 B
Python
17 lines
443 B
Python
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain import IngestJob
|
|
|
|
|
|
class IngestJobRepository(Protocol):
|
|
def create(self, job: IngestJob) -> IngestJob:
|
|
"""Persist an ingest job and return it."""
|
|
|
|
def get(self, job_id: str) -> IngestJob | None:
|
|
"""Retrieve an ingest job by ID."""
|
|
|
|
def update(self, job: IngestJob) -> IngestJob:
|
|
"""Update an ingest job and return it."""
|