Accepted Work and Completed Work
A service can acknowledge receipt of work before producing its final result. Give callers separate evidence for those states.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a conversion job
Submitting a report may return a job ID immediately. A status request can show queued, running, and complete as results become available. See state transition tables.
Choose the promised acknowledgement
Receipt can mean the job was recorded or simply accepted under a weaker contract. State what survives failure. Writing a state and pending intent gives an example of a durable handoff.[1]
Give each lifecycle state its own observable evidence
Accepting a request to produce a report can create a job identifier. The report does not exist until a worker finishes and persists the result. An accepted job can later fail. Provide a status surface that distinguishes the states. See reading after asynchronous writes.
Submission → accepted, job 27
Status read → running
Worker publishes result → completed, result reference
Error path → failed with a defined reason
Test a reader arriving before a worker
Start the job without delivering it to a worker yet, and check that the status says pending. After completion, read the actual artifact. Include a failed job and an unknown ID so they cannot both look like pending.