Class: SerialBatch
@ima/core.SerialBatch
Basic implementation of the Execution interface. Provides the basic functionality for appending and validating jobs.
Hierarchy
↳
SerialBatch
Constructors
constructor
• new SerialBatch(jobs?
)
Parameters
Name | Type | Default value |
---|---|---|
jobs | ExecutionJob [] | [] |
Inherited from
Defined in
packages/core/src/execution/AbstractExecution.ts:13
Properties
_jobs
• Protected
_jobs: ExecutionJob
[]
Inherited from
Defined in
packages/core/src/execution/AbstractExecution.ts:11
Methods
_executeJob
▸ _executeJob(stage
, args
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
stage | ExecutionJob |
args | unknown [] |
Returns
Promise
<unknown
>
Defined in
packages/core/src/execution/SerialBatch.ts:22
_validateJob
▸ _validateJob(job
): boolean
Return true
if the given job can be executed
Parameters
Name | Type |
---|---|
job | ExecutionJob |
Returns
boolean
Inherited from
AbstractExecution._validateJob
Defined in
packages/core/src/execution/AbstractExecution.ts:44
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
Name | Type | Description |
---|---|---|
jobs | ExecutionJob | ExecutionJob [] | The jobs to be executed. |
Returns
void
Inherited from
Defined in
packages/core/src/execution/AbstractExecution.ts:22
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
Name | Type | Description |
---|---|---|
...args | unknown [] | Arguments to be passed when executing jobs |
Returns
Promise
<unknown
>