Skip to main content

Class: AbstractExecution

@ima/core.AbstractExecution

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

Hierarchy

Constructors

constructor

new AbstractExecution(jobs?)

Parameters

NameTypeDefault value
jobsJob[][]

Overrides

Execution.constructor

Defined in

packages/core/src/execution/AbstractExecution.ts:15

Properties

_jobs

Protected _jobs: Job[]

Defined in

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

Methods

_validateJob

_validateJob(job): boolean

Return true if the given job can be executed

Parameters

NameType
jobJob

Returns

boolean

Defined in

packages/core/src/execution/AbstractExecution.ts:45


append

append(jobs): void

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

NameTypeDescription
jobsJob | Job[]The jobs to be executed.

Returns

void

Overrides

Execution.append

Defined in

packages/core/src/execution/AbstractExecution.ts:24


execute

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

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

NameTypeDescription
...argsunknown[]Arguments to be passed when executing jobs

Returns

Promise<unknown>

Overrides

Execution.execute

Defined in

packages/core/src/execution/AbstractExecution.ts:35