<!-- # hard line break macro for HTML -->

# fiftyone.operators.store.transient_jobs

Transient job coordination backed by Execution Store.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Classes:**

| [`TransientJobCoordinator`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator)(store[, ...])   | Coordinates short-lived work through one Execution Store.   |
|---------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|

**Exceptions:**

| [`TransientJobAlreadyExists`](#fiftyone.operators.store.transient_jobs.TransientJobAlreadyExists)(job_id)   | Raised when a transient job ID already exists.                    |
|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [`TransientJobConflict`](#fiftyone.operators.store.transient_jobs.TransientJobConflict)(job_id)             | Raised when concurrent writers repeatedly prevent a job mutation. |

### *class* fiftyone.operators.store.transient_jobs.TransientJobCoordinator(store, ttl_seconds=86400, lease_seconds=900)

Bases: `object`

Coordinates short-lived work through one Execution Store.

This class owns coordination state only. Callers remain responsible for
starting workers and transporting their results.

* **Parameters:**
  * **store** – an [`fiftyone.operators.store.ExecutionStore`](fiftyone.operators.store.md#fiftyone.operators.store.ExecutionStore)
  * **ttl_seconds** (*86400*) – retention for job records
  * **lease_seconds** (*900*) – duration of a worker claim

**Methods:**

| [`create`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.create)(\*, owner, scope, payload[, job_id])         | Creates one requested job with immutable caller data.            |
|----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| [`get`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.get)(job_id)                                            | Returns a detached job value, or `None` when it is absent.       |
| [`claim`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.claim)(job_id, \*[, allow_reclaim])                   | Atomically claims one requested or lease-expired job.            |
| [`heartbeat`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.heartbeat)(job_id, fencing_token)                 | Renews a running worker's lease.                                 |
| [`set_progress`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.set_progress)(job_id, fencing_token, progress) | Persists progress from the current fenced worker.                |
| [`request_cancel`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.request_cancel)(job_id)                      | Requests cancellation or cancels work that has not been claimed. |
| [`cancel`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.cancel)(job_id, fencing_token)                       | Marks the current worker's job canceled.                         |
| [`complete`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.complete)(job_id, fencing_token[, result])         | Completes the current worker's job.                              |
| [`fail`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.fail)(job_id, fencing_token, error)                    | Fails the current worker's job with a caller-sanitized error.    |
| [`fail_expired`](#fiftyone.operators.store.transient_jobs.TransientJobCoordinator.fail_expired)(job_id, error)                   | Fails a running job whose worker lease has expired.              |

#### create(, owner, scope, payload, job_id=None)

Creates one requested job with immutable caller data.

#### get(job_id)

Returns a detached job value, or `None` when it is absent.

#### claim(job_id, , allow_reclaim=True)

Atomically claims one requested or lease-expired job.

* **Returns:**
  the claimed job, including its new fencing token, or `None`

#### heartbeat(job_id, fencing_token)

Renews a running worker’s lease.

#### set_progress(job_id, fencing_token, progress)

Persists progress from the current fenced worker.

#### request_cancel(job_id)

Requests cancellation or cancels work that has not been claimed.

#### cancel(job_id, fencing_token)

Marks the current worker’s job canceled.

#### complete(job_id, fencing_token, result=None)

Completes the current worker’s job.

#### fail(job_id, fencing_token, error)

Fails the current worker’s job with a caller-sanitized error.

#### fail_expired(job_id, error)

Fails a running job whose worker lease has expired.

This is a coordinator recovery transition rather than a worker
mutation, so it is guarded by the expired lease instead of a fencing
token. A current worker still owns every mutation while its lease is
valid.

### *exception* fiftyone.operators.store.transient_jobs.TransientJobAlreadyExists(job_id)

Bases: `RuntimeError`

Raised when a transient job ID already exists.

**Methods:**

| [`add_note`](#fiftyone.operators.store.transient_jobs.TransientJobAlreadyExists.add_note)(object, /)             | Exception.add_note(note) -- add a note to the exception                         |
|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [`with_traceback`](#fiftyone.operators.store.transient_jobs.TransientJobAlreadyExists.with_traceback)(object, /) | Exception.with_traceback(tb) -- set self._\_traceback_\_ to tb and return self. |

**Attributes:**

| [`args`](#fiftyone.operators.store.transient_jobs.TransientJobAlreadyExists.args)   |    |
|-------------------------------------------------------------------------------------|----|

#### add_note(object,)

Exception.add_note(note) –
add a note to the exception

#### args

#### with_traceback(object,)

Exception.with_traceback(tb) –
set self._\_traceback_\_ to tb and return self.

### *exception* fiftyone.operators.store.transient_jobs.TransientJobConflict(job_id)

Bases: `RuntimeError`

Raised when concurrent writers repeatedly prevent a job mutation.

**Methods:**

| [`add_note`](#fiftyone.operators.store.transient_jobs.TransientJobConflict.add_note)(object, /)             | Exception.add_note(note) -- add a note to the exception                         |
|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [`with_traceback`](#fiftyone.operators.store.transient_jobs.TransientJobConflict.with_traceback)(object, /) | Exception.with_traceback(tb) -- set self._\_traceback_\_ to tb and return self. |

**Attributes:**

| [`args`](#fiftyone.operators.store.transient_jobs.TransientJobConflict.args)   |    |
|--------------------------------------------------------------------------------|----|

#### add_note(object,)

Exception.add_note(note) –
add a note to the exception

#### args

#### with_traceback(object,)

Exception.with_traceback(tb) –
set self._\_traceback_\_ to tb and return self.
