new Task(params)
Create task.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | Task details. Properties
|
Members
-
endEventName :string
-
Unique end event name for this task.
-
nullable fn :function
-
Task function.
-
id :string
-
Task ID.
-
status :TaskStatus
-
Task status.
Methods
-
async run(fnopt) → {any}
-
Run task and get result.
Parameters:
Name Type Attributes Default Description fn
function <optional>
this.fn Task executor.
Throws:
-
Error from
QErrors
in case of internal error or anything thrown from executor. - Type
- Error
Returns:
any -Task executor result.
-