 | IStateReason Property |
Gets the human-readable reason of a state transition.
Namespace: Hangfire.StatesAssembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax[CanBeNullAttribute]
string Reason { get; }
<CanBeNullAttribute>
ReadOnly Property Reason As String
Get
Property Value
Type:
StringAny string with a reasonable length to fit dashboard elements.
RemarksThe reason is usually displayed in the Dashboard UI to simplify
the understanding of a background job lifecycle by providing a
human-readable text that explains why a background job is moved
to the corresponding state. Here are some examples:
- Can not change the state to 'Enqueued': target
method was not found
- Exceeded the maximum number of retry attempts
Notes to Implementers |
---|
The reason value is usually not hard-coded in a state implementation,
allowing users to change it when creating an instance of a state
through the public setter.
|
See Also