State machine
Completed, Failed, Timeout, and Cancelled are terminal. A terminal job will not be processed again.
States
Pending
The job is queued and waiting for a runner to pick it up. Lynx manages distribution — you do not need to assign jobs to runners manually.Claimed
A runner has taken ownership of the job and is preparing to execute it. Theassigned_runner field is set and claimed_at is recorded.
Running
The simulation is actively executing on the runner. Thestarted_at timestamp is set.
Completed
The simulation finished successfully. AJobResult is available via GET /jobs/{job_id}/results.
Failed
The simulation failed and all retries are exhausted. The job record includes anerror_message. A partial JobResult may be available with success: false.
If retries < max_retries at the time of failure, Lynx automatically requeues the job. It returns to Pending and gets picked up by the next available runner. The retry counter increments on each attempt.
Timeout
The job exceededtimeout_secs without completing. It is treated as a failed terminal state.
Cancelled
The job was cancelled before reaching a terminal state.Job result
A completed job produces a result accessible via the API:success: false and a non-null error_message.
Fetch lifecycle data
Polling for completion
Poll the batch status endpoint untilstatus is Completed or Failed:
jobs_by_status field shows the current count in each state, which is useful for progress tracking without fetching every individual job.