reference
Class: Job<Output>
job/job.Job
State of a computation unit.
Description
Represents the state of some computation unit. The purpose of this class is to provide a way to check the state, results and error of a computation unit knowing only its id.
Type parameters
| Name | Type |
|---|---|
Output | unknown |
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Job<Output>(id, jobStorage)
Type parameters
| Name | Type |
|---|---|
Output | unknown |
Parameters
| Name | Type |
|---|---|
id | string |
jobStorage | JobStorage |
Defined in
Properties
id
• Readonly id: string
Defined in
Methods
saveInitialState
▸ saveInitialState(): Promise<void>
Returns
Promise<void>
Defined in
saveState
▸ saveState(state, results?, error?): Promise<void>
Parameters
| Name | Type |
|---|---|
state | TaskState |
results? | Output |
error? | Error |
Returns
Promise<void>
Defined in
fetchState
▸ fetchState(): Promise<TaskState>
Returns
Promise<TaskState>
Defined in
fetchResults
▸ fetchResults(): Promise<undefined | Output>
Returns
Promise<undefined | Output>
Defined in
fetchError
▸ fetchError(): Promise<undefined | Error>
Returns
Promise<undefined | Error>