-
Notifications
You must be signed in to change notification settings - Fork 151
Open
tjunxiang92/workflow
#1Description
I have a workflow that sleeps and on random occasions, the workflow does not resume. The sleep duration usually ranges from 50 - 9000ms. When I rounded to the nearest second, it seems to reduce the issue but it occured at around 30 minutes mark of my workflow. In Vercel logs, there is a timeout log observed everytime the error occurs
async function sleepIfRequired(startTime: number, delayMs: number) {
// BUG: Rounded to the nearest thousand seem to not lead to any issues
const timeTaken = Date.now() - startTime;
const sleepTime = Math.ceil((delayMs - timeTaken) / 1000) * 1000;
if (sleepTime >= 1000) {
await sleep(sleepTime);
}
}I am using: "workflow": "4.0.1-beta.32"

Metadata
Metadata
Assignees
Labels
No labels