Closed noubase closed 2 weeks ago
Additionally, it seems that setting maxRetries
> 0 makes a step asynchronous, as the workflow returns a result immediately.
Hey @noubase ,
your workflow becomes async
because you are setting the retryInterval
which is a timer and therefore means that it is not synchronous anymore.
also, about throwing on each error, by design an execution needs to be finished before we throw the errors, just throwing them when they happen would prevent the workflow from continuing its execution since throwing stop immediately unless being catched. Which is what we do and then report them back to you.
I hope it is clear, let me know if it is not
Hi @noubase, I am closing the issue as it is working as expected, as Adrien describes. If you are still facing other issues then don't hesitate to open a new issue.
your workflow becomes
async
because you are setting theretryInterval
which is a timer and therefore means that it is not synchronous anymore.
This is very confusing and counterintuitive because there’s already an async?: boolean
field in the step configuration. So currently, there’s no way to configure a step to retry synchronously three times with a 100 ms interval, is that correct?
your workflow becomes
async
because you are setting theretryInterval
which is a timer and therefore means that it is not synchronous anymore.This is very confusing and counterintuitive because there’s already an
async?: boolean
field in the step configuration. So currently, there’s no way to configure a step to retry synchronously three times with a 100 ms interval, is that correct?
if you want to do that synchronously the second argument of the step you have the attempt
number in the context. You can just check if it is a retry and "sleep" there.
Package.json file
Node.js version
v2
Database and its version
16.2
Operating system name and version
Mac OS X
Browser name
No response
What happended?
route.ts
Console output
The workflow engine should re-throw an error that occurs in a step when maxRetries is set to a value greater than 0.
Expected behavior
Error should be re-thrown when using
maxRetries
in a workflow stepActual behavior
The error is simply logged to the error output.
Link to reproduction repo
on need