JS Task API Reference

Interface: TaskExecutorEventsDict

events.TaskExecutorEventsDict

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

Table of contents

Properties

Properties

start

• start: (timestamp: number) => void

Type declaration

â–¸ (timestamp): void

Fires when task executor is created, before initialization services.

Parameters
NameType
timestampnumber
Returns

void

Defined in

src/events.ts:11


ready

• ready: (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

src/events.ts:16


beforeEnd

• beforeEnd: (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

src/events.ts:21


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

src/events.ts:26


end

• end: (timestamp: number) => void

Type declaration

â–¸ (timestamp): void

Fires when task executor is completely terminated.

Parameters
NameType
timestampnumber
Returns

void

Defined in

src/events.ts:31


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

src/events.ts:38


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

src/events.ts:45


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

src/events.ts:52


taskCompleted

• taskCompleted: (task: TaskDetails) => void

Type declaration

â–¸ (task): void

Fires when a task is successfully completed

Parameters
NameType
taskTaskDetails
Returns

void

Defined in

src/events.ts:59


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

src/events.ts:66


golemEvents

• golemEvents: (event: BaseEvent<unknown>) => void

Type declaration

â–¸ (event): void

Exposes internal @golem-sdk/golem-js events

Parameters
NameType
eventBaseEvent<unknown>
Returns

void

Deprecated

This options is deprecated and will be removed. Alternative ways to reach these events will be provided.

Defined in

src/events.ts:75