JS Task API Reference

Interface: ExecutorEvents

events.ExecutorEvents

This interface describes events emitted by TaskExecutor through TaskExecutor.events object.

Table of contents

Properties

Properties

executorReady

executorReady: (timestamp: number) => void

Type declaration

▸ (timestamp): void

Fires when task executor is initialized and ready to be used.

Parameters
NameType
timestampnumber
Returns

void

Defined in

events.ts:10


executorBeforeEnd

executorBeforeEnd: (timestamp: number) => void

Type declaration

▸ (timestamp): void

Fires when task executor is about to shut down, immediately after TaskExecutor.shutdown() is called.

Parameters
NameType
timestampnumber
Returns

void

Defined in

events.ts:15


criticalError

criticalError: (err: Error) => void

Type declaration

▸ (err): void

Fires when task executor encountered an unrecoverable error and is about to shut down.

Parameters
NameType
errError
Returns

void

Defined in

events.ts:20


executorEnd

executorEnd: (timestamp: number) => void

Type declaration

▸ (timestamp): void

Fires when task executor is completely terminated.

Parameters
NameType
timestampnumber
Returns

void

Defined in

events.ts:25


taskQueued

taskQueued: (task: TaskDetails) => void

Type declaration

▸ (task): void

Fires when a task is placed in the internal queue via TaskExecutor.run

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

events.ts:32


taskStarted

taskStarted: (task: TaskDetails) => void

Type declaration

▸ (task): void

Fires when the task gets picked up from the internal queue and is getting executed

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

events.ts:39


taskRetried

taskRetried: (task: TaskDetails) => void

Type declaration

▸ (task): void

Fires when the task had to be re-tried due to an error check - error for details of the issue

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

events.ts:46


taskCompleted

taskCompleted: (task: TaskDetails) => void

Type declaration

▸ (task): void

Fires when a task is successfully completed

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

events.ts:53


taskFailed

taskFailed: (task: TaskDetails) => void

Type declaration

▸ (task): void

Fires when a task has failed and won't be re-tried any longer

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

events.ts:60

Was this helpful?