← Về thư mục
openai4s/storage/compute_jobs.py
- ComputeJobRepository · class · L86-L384 — class ComputeJobRepository
- init · method · L89-L98 — def init( self, connection: sqlite3.Connection, lock: Any, *, clock_ms: Callable[[], int], ) -> None
- create · method · L101-L151 — def create( self, *, job_id: str, provider: str, status: str = "queued", idempotency_key: str | None = None, outputs: Any = None, input_versions: Any = None, owner_key: str | None = None, ) -> dict
- update · method · L153-L214 — def update(self, job_id: str, **fields: Any) -> dict | None
- get · method · L216-L222 — def get(self, job_id: str) -> dict | None
- by_idempotency_key · method · L224-L253 — def by_idempotency_key( self, key: str, owner_key: str | None = None, *, scoped: bool = True ) -> dict | None
- live · method · L255-L279 — def live(self, owner_key: str | None = None, scoped: bool = False) -> list[dict]
- for_owner · method · L281-L307 — def for_owner(self, owner_key: str | None, limit: int = 200) -> list[dict]
- list · method · L309-L316 — def list(self, limit: int = 200) -> list[dict]
- delete · method · L318-L326 — def delete(self, job_id: str) -> None
- append_event · method · L329-L353 — def append_event(self, job_id: str, kind: str, payload: Any = None) -> int
- events · method · L355-L371 — def events(self, job_id: str) -> list[dict]
- _decode · method · L374-L384 — def _decode(row) -> dict | None