Skip to content

Home > @idealeap/pipeline > Pipe > execute

Pipe.execute() method ​

Executes the pipe's main functionality, handling batching if enabled, and managing retries, errors, pre-processing, and post-processing.

Signature:

typescript
execute(input_: T | T[], context_: PipelineContext): Promise<R | R[]>;
execute(input_: T | T[], context_: PipelineContext): Promise<R | R[]>;

Parameters ​

ParameterTypeDescription
input_T | T[]
context_PipelineContext

Returns:

Promise<R | R[]>

The result of the pipe's execution, which can be an array if batching is enabled.

Exceptions ​

Will throw an error if an invalid ID is used or if batching mode isn't enabled for an array input.

Released under the MIT License.