Replies: 1 comment
-
|
Dify does not currently provide a built-in way to set a custom wait or sleep interval between retries in iteration nodes or the "Code Execution" node. The default retry and timeout settings for nodes like HTTP, LLM, and Tool nodes are hardcoded, but there is an open enhancement request to make these configurable per node in the future. For now, if you need to wait for a certain state (like a task status becoming true) before proceeding, the recommended workaround is to implement the wait logic yourself—either in a Code node (using a loop with a sleep/wait in Python) or by creating a custom tool that handles polling and waiting as needed. There is no official "wait until state" or "sleep" node available at this time, and the Sleep node was removed from the official release for simplicity. You can refer to the HTTP Request node's retry mechanism as a pattern for implementing similar logic in your custom code or tool. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I am using an iteration node, and I initiated a task request using the "Tools" node in the iteration node. At the same time, there is a "Tools" node that checks the status of the task request. If it is not true, the request will be repeated until it is true before returning. I want to wait for the task request status to return true before proceeding to the next iteration, but the "Code Execution" node has a shorter default waiting time. How can I adjust this waiting time?
Or is there any other way to wait for a certain state to be reached in the iteration node before proceeding to the next iteration
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions