from abc import ABC, abstractmethod from typing import Optional from core.domain.worker.WorkerJob import WorkerJob from core.domain.worker.WorkerJobStatus import WorkerJobStatus from core.types.Id import Id class WorkerJobStatusRepo(ABC): @abstractmethod def getAll(self) -> list[WorkerJobStatus]: pass @abstractmethod def get(self, id: Id[WorkerJobStatus]) -> Optional[WorkerJobStatus]: pass @abstractmethod def post(self, workerJobId: Id[WorkerJob], ramTaken: float, cpuUtilization: float, objective: int) -> WorkerJobStatus: pass