Interface: ExecutorEvents
events.ExecutorEvents
This interface describes events emitted by TaskExecutor
through TaskExecutor.events
object.
Table of contents
Properties
- executorReady
- executorBeforeEnd
- criticalError
- executorEnd
- taskQueued
- taskStarted
- taskRetried
- taskCompleted
- taskFailed
Properties
executorReady
• executorReady: (timestamp
: number
) => void
Type declaration
▸ (timestamp
): void
Fires when task executor is initialized and ready to be used.
Parameters
Name | Type |
---|---|
timestamp | number |
Returns
void
Defined in
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
Name | Type |
---|---|
timestamp | number |
Returns
void
Defined in
criticalError
• criticalError: (err
: Error
) => void
Type declaration
▸ (err
): void
Fires when task executor encountered an unrecoverable error and is about to shut down.
Parameters
Name | Type |
---|---|
err | Error |
Returns
void
Defined in
executorEnd
• executorEnd: (timestamp
: number
) => void
Type declaration
▸ (timestamp
): void
Fires when task executor is completely terminated.
Parameters
Name | Type |
---|---|
timestamp | number |
Returns
void
Defined in
taskQueued
• taskQueued: (task
: TaskDetails
) => void
Type declaration
▸ (task
): void
Fires when a task is placed in the internal queue via TaskExecutor.run
Parameters
Name | Type |
---|---|
task | TaskDetails |
Returns
void
Defined in
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
Name | Type |
---|---|
task | TaskDetails |
Returns
void
Defined in
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
Name | Type |
---|---|
task | TaskDetails |
Returns
void
Defined in
taskCompleted
• taskCompleted: (task
: TaskDetails
) => void
Type declaration
▸ (task
): void
Fires when a task is successfully completed
Parameters
Name | Type |
---|---|
task | TaskDetails |
Returns
void
Defined in
taskFailed
• taskFailed: (task
: TaskDetails
) => void
Type declaration
▸ (task
): void
Fires when a task has failed and won't be re-tried any longer
Parameters
Name | Type |
---|---|
task | TaskDetails |
Returns
void
Defined in
Was this helpful?