Skip to main content

Class: SerialBatch

Defined in: packages/core/src/execution/SerialBatch.ts:4

Basic implementation of the Execution interface. Provides the basic functionality for appending and validating jobs.

Extends

Constructors

new SerialBatch()

new SerialBatch(jobs): SerialBatch

Defined in: packages/core/src/execution/AbstractExecution.ts:13

Parameters

jobs

ExecutionJob[] = []

Returns

SerialBatch

Inherited from

AbstractExecution.constructor

Properties

_jobs

protected _jobs: ExecutionJob[]

Defined in: packages/core/src/execution/AbstractExecution.ts:11

Inherited from

AbstractExecution._jobs

Methods

_executeJob()

_executeJob(stage, args): Promise<unknown>

Defined in: packages/core/src/execution/SerialBatch.ts:22

Parameters

stage

ExecutionJob

args

unknown[]

Returns

Promise<unknown>


_validateJob()

_validateJob(job): boolean

Defined in: packages/core/src/execution/AbstractExecution.ts:44

Return true if the given job can be executed

Parameters

job

ExecutionJob

Returns

boolean

Inherited from

AbstractExecution._validateJob


append()

append(jobs): void

Defined in: packages/core/src/execution/AbstractExecution.ts:22

Adds a new job to be executed. The job is appended at the end of the list of current jobs therefore is executed last.

Parameters

jobs

The jobs to be executed.

ExecutionJob | ExecutionJob[]

Returns

void

Inherited from

AbstractExecution.append


execute()

execute(...args): Promise<unknown>

Defined in: packages/core/src/execution/SerialBatch.ts:8

Start executing collected jobs. In the end a Promise is returned with a resulting value. On the returned Promise a catch method can be called to prevent any unwanted interruption.

Parameters

args

...unknown[]

Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

AbstractExecution.execute