Overview
The FlowProducer class allows you to add jobs with dependencies between them in a tree-like structure called a flow. Whenever the children of a given parent are completed, the parent will be processed.Constructor
Configuration options for the flow producer
Example
Methods
add
Adds a flow (tree of jobs) to the queue.An object with a tree-like structure where children jobs will be processed before their parents
Options that will be applied to the flow
The job tree structure with created job instances
FlowJob Structure
addBulk
Adds multiple flows atomically.An array of flow objects
Array of job tree structures with created job instances
getFlow
Retrieves a flow by its root job.Options for getting a flow
NodeOpts
close
Closes the connection.disconnect
Force disconnects the connection.Flow Concepts
Job Dependencies
In a flow, jobs can have parent-child relationships:- Child jobs are processed first
- Parent jobs wait for all children to complete
- Parent jobs can access children’s return values
