Skip to content

job

konigle.managers.cloud.job

Managers for BentoCloud Job resources.

AsyncJobManager

Bases: BaseJobManager, BaseAsyncManager

Asynchronous manager for BentoCloud Job resources.

Example
job = await client.jobs.get(job_id)
if job.is_terminal:
    print(job.status)

__init__(session)

Initialize the AsyncJobManager.

PARAMETER DESCRIPTION
session

Asynchronous HTTP session.

TYPE: AsyncSession

get(id_) async

Retrieve a job by its UUID.

PARAMETER DESCRIPTION
id_

Job UUID returned by a provisioning or deploy call.

TYPE: str

RETURNS DESCRIPTION
Job

Job with current status and log entries.

BaseJobManager

Shared configuration for Job managers.

base_path = '/cloud/api/v1/jobs' class-attribute instance-attribute

API base path for Job resources.

resource_class = Job class-attribute instance-attribute

The resource model class this manager handles.

JobManager

Bases: BaseJobManager, BaseSyncManager

Synchronous manager for BentoCloud Job resources.

Jobs are read-only from the SDK — they are created by service operations like computer provisioning and deployment.

Example
job = client.jobs.get(job_id)
while not job.is_terminal:
    import time; time.sleep(3)
    job = client.jobs.get(job_id)

if job.succeeded:
    print("Done!")
else:
    print("Failed:", job.log)

__init__(session)

Initialize the JobManager.

PARAMETER DESCRIPTION
session

Synchronous HTTP session.

TYPE: SyncSession

get(id_)

Retrieve a job by its UUID.

PARAMETER DESCRIPTION
id_

Job UUID returned by a provisioning or deploy call.

TYPE: str

RETURNS DESCRIPTION
Job

Job with current status and log entries.