Class: abstract
Execution
Defined in: packages/core/src/execution/Execution.ts:18
Execution is an abstract class that defines a standard for executing jobs. The execution can be either done in serial or in parallel way.
When executing jobs in parallel an option should define how to deal with a result of each individual job execution. One option would be to return the result of a job that completes first. Second option is to return result of all jobs once they're all complete.
For serial execution you should define an option that affects how arguments
passed to the execute
method are distributed. They could be either
supplied to each job individually (thus meaning one job's mutation won't
affect another job) or they could be supplied to the first job and then
piped through other jobs.
Extended by
Constructors
new Execution()
new Execution():
Execution
Returns
Methods
append()
append(
jobs
):void
Defined in: packages/core/src/execution/Execution.ts:25
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.
Returns
void
execute()
execute(...
args
):Promise
<unknown
>
Defined in: packages/core/src/execution/Execution.ts:36
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
>