TaskPostrunPayload class

Payload emitted after a task finishes execution.

Implemented types

Constructors

TaskPostrunPayload({required Envelope envelope, required WorkerInfo worker, required TaskContext context, required Object? result, required TaskState state, DateTime? occurredAt})
Creates a new TaskPostrunPayload instance.

Properties

attempt int
The attempt number for this task execution.
no setter
attributes Map<String, Object?>
Event attributes for diagnostics/observability.
no setteroverride
context TaskContext
The execution context for the task.
final
envelope Envelope
The task envelope that was executed.
final
eventName String
Canonical event name.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
occurredAt DateTime
Timestamp when the event occurred.
no setteroverride
result Object?
The result returned by the task.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state TaskState
The final state of the task.
final
taskId String
The unique identifier for the task.
no setter
taskName String
The name of the task.
no setter
worker WorkerInfo
The worker that executed the task.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resultAs<TResult>({required PayloadCodec<TResult> codec}) → TResult?
Decodes the task result with codec.
resultJson<TResult>({required TResult decode(Map<String, dynamic> payload), String? typeName}) → TResult?
Decodes the task result with a JSON decoder.
resultVersionedJson<TResult>({required int version, required TResult decode(Map<String, dynamic> payload, int version), int? defaultDecodeVersion, String? typeName}) → TResult?
Decodes the task result with a version-aware JSON decoder.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited