docs: add note about retryInterval making workflow long-running (#10355)
This commit is contained in:
@@ -74,6 +74,12 @@ The second step has in its configuration object `async` set to `true` and it doe
|
|||||||
|
|
||||||
So, when you execute the `hello-world` workflow, it continues its execution in the background once it reaches the second step.
|
So, when you execute the `hello-world` workflow, it continues its execution in the background once it reaches the second step.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
|
||||||
|
A workflow is also considered long-running if one of its steps has their `retryInterval` option set as explained in [this chapter](../retry-failed-steps/page.mdx).
|
||||||
|
|
||||||
|
</Note>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Change Step Status
|
## Change Step Status
|
||||||
|
|||||||
@@ -64,9 +64,7 @@ The first line indicates the first time the step was executed, and the next two
|
|||||||
|
|
||||||
## Step Retry Intervals
|
## Step Retry Intervals
|
||||||
|
|
||||||
By default, a step is retried immediately after it fails.
|
By default, a step is retried immediately after it fails. To specify a wait time before a step is retried, pass a `retryInterval` property to the step's configuration object. Its value is a number of seconds to wait before retrying the step.
|
||||||
|
|
||||||
To specify a wait time before a step is retried, pass a `retryInterval` property to the step's configuration object. Its value is a number of seconds to wait before retrying the step.
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@@ -82,3 +80,9 @@ const step1 = createStep(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Interval Changes Workflow to Long-Running
|
||||||
|
|
||||||
|
By setting `retryInterval` on a step, a workflow becomes a [long-running workflow](../long-running-workflow/page.mdx) that runs asynchronously in the background. So, you won't receive its result or errors immediately when you execute the workflow.
|
||||||
|
|
||||||
|
Instead, you must subscribe to the workflow's execution using the Workflow Engine Module Service. Learn more about it in [this chapter](../long-running-workflow/page.mdx#access-long-running-workflow-status-and-result).
|
||||||
|
|||||||
Reference in New Issue
Block a user