Skip to content

Jobs

Job tracking for worker computations.

nimbusimage.jobs.Job

A running or completed worker job.

Tracks a Girder Worker job by polling its status. Use wait() to block until the job finishes, optionally printing progress.

id property

The Girder job ID.

status property

Current status code. Call refresh() to update.

status_name property

Human-readable status name.

log property

Full job log text.

refresh()

Fetch latest job status and log from the server.

Raises:

Type Description
PermissionError

If the job-status request returns 401, which almost always means the API key lacks the core.user_auth scope (NIM-005). The message names the likely missing scope.

wait(poll_interval=2.0, timeout=None, verbose=True)

Block until the job finishes.

Parameters:

Name Type Description Default
poll_interval float

Seconds between status polls.

2.0
timeout float | None

Max seconds to wait. None = no limit.

None
verbose bool

If True, print status updates to stderr.

True

Returns:

Type Description
bool

True if the job succeeded, False otherwise.

Raises:

Type Description
TimeoutError

If timeout is reached before the job finishes.

PermissionError

If polling returns 401 — usually a missing core.user_auth scope on the API key (NIM-005). Raised via :meth:refresh.