Skip to content

Auto retry failed flows

Update on the core to have the feature to retry failed flows by setting the retryFailedFlowCronSpan on the flow.configuration. The value of the key defines the seconds that the core will determine if it will retry the failed flow, but first it will still check if the failed flow has a cron job entry that will be executed within the span of time defined in the key value.

If there will be no cron entry that will be executed for the Failed Flow, it will then fetch the number of times that the flow has failed for a day. Then it will use that exponentially increasing the delay before the Failed Flow will be dispatched again using the formula: round(($this->failedFlowDelay * $increaseBy ** 2) * 1000) where the failedFlowDelay is defined on the .env FAILED_FLOW_DELAY_DISPATCH variable and the $increaseBy is the number of times the flow has failed. This way we will not flood the system with failed flows as we are exponentially increasing the delay to retry the failed flow.