Wait
Wait is a simple tool that pauses the flow for a set number of seconds. It can be used to create delays between actions, give time for external processes to finish, or simply space out notifications.
¿Cómo funciona?
When you add the Wait component to your workflow, you set the number of seconds you want the system to pause. The component then holds the execution for that duration before passing the input data or message forward. It does not call any external APIs; it just uses Python’s asyncio.sleep
to wait asynchronously, so the rest of the dashboard remains responsive.
Entradas
- Data: The information you want to keep unchanged while the wait happens. If you connect a data source, the same data will be returned after the pause.
- Message: A text message that you want to delay. If a message is provided, the component will wait and then return the same message.
- Seconds: The number of seconds the component should pause. The default value is 5 seconds, but you can set any positive integer.
Salidas
- Data: The original data that was supplied to the component. It is returned after the waiting period and can be used by subsequent components.
- Message: The original message that was supplied. It is returned after the waiting period and can be forwarded to other parts of the workflow.
Ejemplo de Uso
Imagine you want to send a reminder email, wait 10 seconds, and then log a completion message.
- Connect a “Send Email” component to the Data input of Wait.
- Set Seconds to 10.
- Connect the Data output of Wait to a “Log” component.
The email will be sent immediately, the system will pause for 10 seconds, and then the log will record the completion.
Componentes Relacionados
- Delay – Similar to Wait but can be configured with dynamic expressions.
- Timer – Triggers actions at specific times or intervals.
- Pause – A basic pause that works only with data streams.
Consejos y Mejores Prácticas
- Use Wait sparingly; long pauses can make the dashboard feel sluggish.
- Combine Wait with conditional logic to avoid unnecessary delays.
- When waiting for external services, consider using a dedicated “Check Status” component instead of a fixed delay.
Consideraciones de Seguridad
The Wait component does not handle sensitive data or interact with external services, so there are no special security concerns. Just ensure that any data passed through it is already protected by your system’s standard security measures.