Job
Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.
Up and coming
One piece of work in a queue: wait for its result, see where it is, or cancel it.
JobQueue's Add gives one, a child of its queue while it waits or runs. Status is Waiting, Running, Done, Failed or Cancelled, and Finished fires with the final one. Cancelling a waiting job drops it; a running one is marked and its result ignored.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Status | "Waiting" | "Running" | "Done" | "Failed" | "Cancelled" | ||
| Result | any | ||
| Error | string? | ||
| Tries | number | ||
| StartedAt | number? | ||
| EndedAt | number? |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| WaitAsync yields | () | (any, string?) | Waits for the job to end and returns its result, or nil and the error. |
| Cancel | () | () | Drops a waiting job; a running one is marked and its result ignored. |
Events
| Name | Passes | Description |
|---|---|---|
| Finished | (string) | Fires with the final Status when the job ends. |
From ShotInstance 33
ClassNameNameParentAncestryChangedAttributeChangedChangedChildAddedChildRemovedDestroyingAddTagClearAllChildrenCloneDestroyFindFirstAncestorFindFirstAncestorOfClassFindFirstAncestorWhichIsAFindFirstChildFindFirstChildOfClassFindFirstChildWhichIsAGetAttributeGetAttributeChangedSignalGetAttributesGetChildrenGetDescendantsGetFullNameGetPropertyChangedSignalGetTagsHasTagIsAIsAncestorOfIsDescendantOfRemoveTagSetAttribute
