Skip to content

Commit 1d619eb

Browse files
fix(docs): sleep status descriptions
1 parent 3909135 commit 1d619eb

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

packages/docs/docs/sleeping.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export const reminderWorkflow = defineWorkflow(
4848
When a workflow encounters `step.sleep()`:
4949

5050
1. A step attempt is created with the resume time
51-
2. The workflow status changes to `sleeping`
51+
2. The workflow is durably parked in `running` with `workerId = null` and
52+
`availableAt` set to the resume time
5253
3. The worker releases the workflow (frees the slot)
5354
4. When the sleep duration elapses, the workflow becomes available again
5455
5. A worker claims it and resumes from after the sleep

packages/docs/docs/workflows.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,13 @@ defineWorkflow({ name: "example" }, async ({ input, step, version, run }) => {
236236

237237
A workflow run progresses through these states:
238238

239-
| Status | Description |
240-
| ----------- | -------------------------------------------------------------- |
241-
| `pending` | Created and waiting for a worker to claim it |
242-
| `running` | Actively being executed by a worker |
243-
| `sleeping` | Paused while waiting for `step.sleep` or `step.runWorkflow` |
244-
| `completed` | Finished successfully |
245-
| `failed` | Failed after exhausting retries, hitting deadline, or step cap |
246-
| `canceled` | Explicitly canceled and will not continue |
239+
| Status | Description |
240+
| ----------- | -------------------------------------------------------------------------------- |
241+
| `pending` | Created and waiting for a worker to claim it |
242+
| `running` | Actively executing, or durably parked with `workerId = null` until `availableAt` |
243+
| `completed` | Finished successfully |
244+
| `failed` | Failed after exhausting retries, hitting deadline, or step cap |
245+
| `canceled` | Explicitly canceled and will not continue |
247246

248247
## Determinism
249248

0 commit comments

Comments
 (0)