Skip to main content

Module async_job

Module async_job 

Source
Expand description

Storage for asynchronous jobs: work a request kicks off and a worker finishes later, followed by the client through the FHIR Asynchronous Request Pattern.

A job is one row in async_jobs. The server creates it (accepted), a worker claims it (in-progress) and holds it under a lease it renews while it works, then records the result (completed / failed). The client can cancel it at any point (cancelled), and every job expires.

See the 20261014120000_async_jobs migration for why this is its own table rather than a kind on the indexing lock table.

Structs§

AsyncJob
A job as stored.
CreateAsyncJob
What a kick-off records about a new job.
JobLease
Identifies the worker holding a job, and for how long one renewal lasts.

Enums§

AsyncJobStatus
Where a job is in its life. Mirrors the async_job_status enum.
JobResult
How a finished job ended.
LeaseRenewal
What a lease renewal found.

Traits§

AsyncJobProvider