FailedState Class |
Namespace: Hangfire.States
The FailedState type exposes the following members.
Name | Description | |
---|---|---|
FailedState |
Initializes a new instace of the FailedState class
with the given exception.
|
Name | Description | |
---|---|---|
Exception |
Gets the exception that occurred during the background job processing.
| |
FailedAt |
Gets a date/time when the current state instance was created.
| |
IgnoreJobLoadException |
Gets whether transition to this state should ignore job de-serialization
exceptions.
| |
IsFinal |
Gets if the current state is a final one.
| |
Name |
Gets the unique name of the state.
| |
Reason |
Gets the human-readable reason of a state transition.
|
Name | Description | |
---|---|---|
SerializeData |
Gets a serialized representation of the current state.
|
Failed state is used in Hangfire when something went wrong and an exception occurred during the background job processing. The primary reason for this state is to notify the developers that something went wrong. By default background job is moved to the Failed state only after some automatic retries, because the AutomaticRetryAttribute filter is enabled by default.
Important |
---|
Failed jobs are not expiring and will stay in your current job storage
forever, increasing its size until you retry or delete them manually. If you
expect some exceptions, please use the following rules.
|
It is not supposed to use the FailedState class in a user code unless you are writing state changing filters or new background processing rules.