This topic was automatically generated from Slack. You can find the original thread here.
I’m having a lot of trouble with $.flow.rerun() and would greatly appreciate some help. I feel like i’ve tried almost everything, even Pi couldn’t even help.
Every time I try to test a step which has the $.flow.rerun() getting triggered in it, it just gets stuck running and the step never completes testing. It’s like it breaks and I don’t even get a timeout error…
I’m using this feature to poll a thread “run” status with the openAI assistants API using node.js and the openAI SDK.
Is there something I could be missing? I’m happy to provide my current code. Thank you for your attention
Hey , I believe you’re using $.flow.rerun incorrectly. The $.flow.rerun will pause your whole workflow. If you want to retry in your function, you’ll need to implement a function to retry in your code
However, support is improving! (see this thread from yesterday)
What I would suggest is to log the return of $.flow.rerun(), especially the resume_url. Then, just call that URL by hand in order to “wake up” the workflow.
You can wait 30 seconds or however long you want before calling it. That will give you a similar behavior to how it will work once deployed.
So it seems like the resume_url functionality now works well in the builder, but not the pause/delay+timeout part. But I’m sure that will be supported soon as well.
Although I did run into a weird issue today actually, because when the resume_url was called by a webhook/callback, it resumed the workflow three times. I know because I received three Slack notifications that the workflow had competed.
Edit: Just debugged this with , and it only happens when the resume_url is called multiple times in quick succession.
Edit: Just debugged this with , and it only happens when the resume_url is called multiple times in quick succession
Yup, and also in the builder, not on deployed workflows
@U05LWJMUX0A
Thank you guys for your input! I’m still relatively new to pipedream and javascript too actually. And thanks for the datastore tip! i’m not familiar with ds but i’ll read up