Skip to main content
Slow NDI operations return a Job. You can wait for completion, read the latest state, stream progress, cancel active work, or list past jobs through client.jobs.

Submit and wait

jobs.wait polls until the job is terminal. Its default timeout is 300 seconds. A timeout stops waiting but does not cancel the server-side job.

Choose inline wait or polling

Job-creating methods accept wait_seconds. This asks the server to hold the submission response open for up to 300 seconds:
The method returns a Job either way. Read its status; if it is still queued or running, continue with client.jobs.wait.
wait_seconds is a server-side hold-open window. The timeout passed to jobs.wait is the SDK’s total polling budget. Neither timeout cancels the job.

Retrieve job status

Use jobs.get when you control polling or need the latest state once.
Treat status values as open-ended. Use job.is_terminal or the exported JobStatus members instead of assuming this table can never grow.

Handle failures and timeouts

By default, jobs.wait raises JobFailedError for failed or cancelled jobs and JobTimeoutError when its local wait budget expires. Both exceptions carry the last job state.
Set raise_on_failure=False when you prefer to inspect a failed or cancelled job as a normal return value.

Cancel a job

Only queued or running jobs can be cancelled. Cancelling a terminal job raises ConflictError with code job_not_cancellable.

List and paginate jobs

jobs.list returns one cursor page, newest first. Filter by workspace, kind, status, or creation time.
Use iter_all to traverse every page without managing cursors.

Stream progress

jobs.events yields Server-Sent Events until the job becomes terminal or the server closes the stream.
Events are a latency convenience, not a completion guarantee. Always confirm the final state with jobs.get or jobs.wait. Pass last_event_id= when reconnecting to continue the event sequence.

Inspect or delete a job

For document operations, jobs.request returns the request settings used by a stored job:
jobs.delete(job_id) soft-deletes a job from listings. Billing records remain, and reading the job directly still returns its deleted_at value. Deleting a queued or running job cancels it first.

Result retention

The job row can outlive its result payload. Check job.result_state before using an older result. When retention has removed the payload, request and artifact reads raise ResultExpiredError.

Methods

Next steps