iexec / <internal> / DealObservable
new DealObservable():
DealObservable
DealObservable
subscribe(
callbacks): () =>void
subscribe to deal updates via an Observer until either complete() or error(error: Error) is called on the Observer or the subscribtion is canceled by calling the returned unsubscribe method.
return the unsubscribe: () => void method.
data:
| message | comment |
|---|---|
DEAL_UPDATED |
sent every time a task status changes |
DEAL_COMPLETED |
sent once all tasks are completed |
DEAL_TIMEDOUT |
sent once the timeout is reached before all tasks completion |
() => any
callback fired once when all the tasks are completed or when the deadline is reached
no other callback is fired after firing complete()
(error) => any
callback fired once when an error occurs
no other callback is fired after firing error(error: Error)
(data) => any
callback fired with initial deal status and after every deal status update
data:
| message | comment |
|---|---|
DEAL_UPDATED |
sent every time a task status changes |
DEAL_COMPLETED |
sent once all tasks are completed |
DEAL_TIMEDOUT |
sent once the timeout is reached before all tasks completion |
():
void
void