type
TaskResult
Typed task status, attempts, failure, timestamps, and optional output.
Properties
| Property | Type | Description |
|---|---|---|
ID | string | The durable task identity. |
Slug | string | The registered task definition slug. |
Queue | string | The selected worker queue. |
State | store.TaskState | The current durable lifecycle state. |
Attempts | int | The number of attempts already started. |
MaxAttempts | int | The maximum number of attempts captured at admission. |
LastErrorCode | string | The stable last failure category. |
LastError | string | The bounded last handler failure message. Handlers must not return secrets in errors. |
CreatedAt | time.Time | When the task was admitted. |
UpdatedAt | time.Time | When the durable record last changed. |
CompletedAt | *time.Time | When the task reached a terminal state. |
Output | Output | Strictly decoded typed output after success. |
HasOutput | bool | Distinguishes valid zero/null output from a task that has not succeeded. |
Full signature
type TaskResult[Output any] = core.TaskResult[Output]