type
TaskResult
Typed local status view for one durable task.
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] struct {
ID string
Slug string
Queue string
State store.TaskState
Attempts int
MaxAttempts int
LastErrorCode string
LastError string
CreatedAt time.Time
UpdatedAt time.Time
CompletedAt *time.Time
Output Output
HasOutput bool
}