-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:workflowsWorkflows: https://developers.cloudflare.com/workflows/Workflows: https://developers.cloudflare.com/workflows/
Description
Existing documentation URL(s)
What changes are you suggesting?
On the workflow documentation, there is a mention that we should not rely on the state outside of a step; however, there is no mention about mutating the state.
Would the state be reset to the first instance, or kept in memory?
Additional information
let myOutput = await step.do('something', async () => {
return Number(1);
});
while (myOutput < 10) {
await step.sleep("💤💤💤💤", "3 hours");
myOutput = await step.do('something', async () => {
return myOutput + 1;
});
}In this example, would myOutput be 1 or 10?
Metadata
Metadata
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:workflowsWorkflows: https://developers.cloudflare.com/workflows/Workflows: https://developers.cloudflare.com/workflows/