Wait for Workers
Type:
wait_for_workers• Category:flow• Tags:wait,sync,parallel,coordination,workflow
Description
Wait for specified workers to complete execution
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
worker_ids | string | List of worker execution IDs to wait for (leave empty for auto-detection) | no | |
check_interval | number | Seconds between status checks | no | 1 |
timeout | number | Maximum seconds to wait (0 = no timeout) | no | 300 |
fail_on_error | boolean | Fail immediately if any worker fails | no | false |
Help
Wait for Workers
This worker waits for other workers to complete their execution. It periodically checks the status of specified workers in a loop until all have finished.
Auto-Detection Mode: If no worker_ids are specified, the worker automatically detects all workers that have connections leading to this wait_for_workers node in the workflow. This is the recommended approach for most use cases.
Manual Mode: You can manually specify worker_ids if you need to wait for specific workers that may not be directly connected.
Use Cases:
- Synchronize parallel workflow branches
- Wait for data processing to complete before proceeding
- Coordinate multiple API calls or data fetches
- Ensure dependent operations run in correct order
How it works:
- Auto-detect connected workers or use manually specified worker_ids
- Check status periodically (configurable interval)
- Continue when all workers complete or timeout occurs
- Optionally fail if any worker encounters an error
Parameters:
- worker_ids: List of worker execution IDs to wait for (optional - auto-detected if empty)
- check_interval: Seconds between status checks (default: 1.0)
- timeout: Maximum wait time in seconds (default: 300, 0 = no limit)
- fail_on_error: Stop waiting if any worker fails (default: false)
Returns:
- completed: List of successfully completed worker IDs
- failed: List of failed worker IDs
- timeout: Whether the wait timed out
- total_waited: Total seconds waited
- auto_detected: Whether worker IDs were auto-detected
Example: In auto-detection mode, simply connect workers to this wait_for_workers node and they will be automatically monitored.