backend.api.models.schemas.job_models

Contains the Pydantic model for a generic job.

The job is used to represent a job in the system.

Classes

JobStatus

The job status model.

Module Contents

class backend.api.models.schemas.job_models.JobStatus(/, **data: Any)

Bases: pydantic.BaseModel

The job status model.

This model is used to represent the status of a job in the system. It contains the module name, status, result, and error message. The status can be one of the following: “pending”, “running”, “completed”, or “failed”. The result is an optional dictionary containing the result of the job. The error is an optional string containing the error message if the job failed.

module: str
status: Literal['pending', 'running', 'complete', 'failed']
result: Dict[str, Any] | None = None
error: str | None = None