Task
The Task class is used to submit and inspect tasks.
Constructor Summary
Public Constructor | ||
public |
constructor(service: Service, taskName: string) |
Member Summary
Public Members | ||
public |
The task name. |
|
public |
The parent service. |
Private Members | ||
private |
_client: * |
Method Summary
Public Methods | ||
public |
Retrieves the task information. |
|
public |
submit(submitOptions: SubmitOptions, progressCallback: function(info: JobProgressInfo), startedCallback: function(info: JobStartedInfo)): Promise<Job, error> Submits the job. |
|
public |
submitAndWait(submitOptions: SubmitOptions, progressCallback: function(info: JobProgressInfo), startedCallback: function(info: JobStartedInfo)): Promise<JobResults, error> Submits the job and waits for results. |
Public Constructors
Public Methods
public submit(submitOptions: SubmitOptions, progressCallback: function(info: JobProgressInfo), startedCallback: function(info: JobStartedInfo)): Promise<Job, error> source
Submits the job.
Params:
Name | Type | Attribute | Description |
submitOptions | SubmitOptions | The job submit options. |
|
progressCallback | function(info: JobProgressInfo) |
|
The callback to handle job progress. |
startedCallback | function(info: JobStartedInfo) |
|
The callback that is called when the job starts. For more reliable job started information, listen to the GSF JobStarted events as this callback may not always get called. In some cases the job can start before the callback is registered. |
public submitAndWait(submitOptions: SubmitOptions, progressCallback: function(info: JobProgressInfo), startedCallback: function(info: JobStartedInfo)): Promise<JobResults, error> source
Submits the job and waits for results. Resolves the promise if the job succeeds and rejects the promise if the job fails.
Params:
Name | Type | Attribute | Description |
submitOptions | SubmitOptions | The job submit options. |
|
progressCallback | function(info: JobProgressInfo) |
|
The callback to handle job progress. |
startedCallback | function(info: JobStartedInfo) |
|
The callback that is called when the job starts. For more reliable job started information, listen to the GSF JobStarted events as this callback may not always get called. In some cases the job can start before the callback is registered. |