Skip to content

job

konigle.models.cloud.job

Pydantic model for BentoCloud Job resources.

Job

Bases: BaseResource

An async Celery task triggered by an API call.

Created by slow operations such as computer provisioning and deployment. Poll JobManager.get(id_) until status reaches success or failed.

completed_at = Field(default=None, title='Completed At', description='Set when status transitions to success or failed.') class-attribute instance-attribute

Set when status transitions to success or failed.

created_at = Field(..., title='Created At', description='Creation timestamp.') class-attribute instance-attribute

Creation timestamp.

id = Field(..., title='ID', description='UUID primary key returned to the caller for polling.') class-attribute instance-attribute

UUID primary key.

is_terminal property

Return True if the job has reached a terminal state.

log = Field(default_factory=list, title='Log', description='Structured log entries written during execution.') class-attribute instance-attribute

Structured log entries written during execution.

status = Field(..., title='Status', description='Current status: pending, running, success, failed.') class-attribute instance-attribute

Current status.

succeeded property

Return True if the job completed successfully.

task_name = Field(..., title='Task Name', description="Celery task name, e.g. 'provision_computer'.") class-attribute instance-attribute

Celery task name.