Class: TaskObservable

December 9, 2025 ยท View on GitHub

iexec


iexec / <internal> / TaskObservable

Class: TaskObservable

Extends

Constructors

Constructor

new TaskObservable(): TaskObservable

Returns

TaskObservable

Inherited from

Observable.constructor

Methods

subscribe()

subscribe(callbacks): () => void

subscribe to task updates via an Observer until either complete() or error(error: Error) is called on the Observer or the subscription is canceled by calling the returned unsubscribe method.

return the unsubscribe: () => void method.

data:

messagecomment
TASK_UPDATEDsent with every time the task status changes
TASK_COMPLETEDsent once when the task is completed
TASK_TIMEDOUTsent once when the deadline is reached before completion
TASK_FAILEDsent once when the task is claimed after a timeout

Parameters

callbacks
complete?

() => any

callback fired once when the task is completed or when the deadline is reached

no other callback is fired after firing complete()

error?

(error) => any

callback fired once when an error occurs

no other callback is fired after firing error(error: Error)

next?

(data) => any

callback fired with initial task status and after every task status update

data:

messagecomment
TASK_UPDATEDsent with every time the task status changes
TASK_COMPLETEDsent once when the task is completed
TASK_TIMEDOUTsent once when the deadline is reached before completion
TASK_FAILEDsent once when the task is claimed after a timeout

Returns

(): void

Returns

void

Overrides

Observable.subscribe