Function: chain()
ts
function chain(
queueName,
jobs,
connection,
prefix?): Promise<JobNode>;Defined in: glide-mq/src/workflows.ts:20
Chain: execute jobs sequentially. Each step becomes a child of the next, so step N+1 only runs after step N completes. The last job in the array runs first; the first job in the array runs last and is the top-level parent.
Returns the JobNode tree. The top-level job (jobs[0]) is the root. When the chain completes, the root's processor can call getChildrenValues() to access results from children.
Parameters
| Parameter | Type |
|---|---|
queueName | string |
jobs | WorkflowJobDef[] |
connection | ConnectionOptions |
prefix? | string |
Returns
Promise<JobNode>