fiftyone.operators.store.transient_jobs#

Transient job coordination backed by Execution Store.

Copyright 2017-2026, Voxel51, Inc.

Classes:

TransientJobCoordinator(store[, ...])

Coordinates short-lived work through one Execution Store.

Exceptions:

TransientJobAlreadyExists(job_id)

Raised when a transient job ID already exists.

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:

Methods:

create(*, owner, scope, payload[, job_id])

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])

Atomically claims one requested or lease-expired job.

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])

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.

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(object, /)

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

with_traceback(object, /)

Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.

Attributes:

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(object, /)

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

with_traceback(object, /)

Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.

Attributes:

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.