EnqueuedState Class |
Namespace: Hangfire.States
The EnqueuedState type exposes the following members.
Name | Description | |
---|---|---|
EnqueuedState |
Initializes a new instance of the EnqueuedState class
with the default queue name.
| |
EnqueuedState(String) |
Initializes a new instance of the EnqueuedState class
with the specified queue name.
|
Name | Description | |
---|---|---|
EnqueuedAt |
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.
| |
Queue |
Gets or sets a queue name to which a background job identifier
will be added.
| |
Reason |
Gets the human-readable reason of a state transition.
|
Name | Description | |
---|---|---|
SerializeData |
Gets a serialized representation of the current state.
|
Name | Description | |
---|---|---|
DefaultQueue |
Represents the default queue name. This field is constant.
| |
StateName |
Represents the name of the Enqueued state. This field is read-only.
|
Background job in EnqueuedState is referred as fire-and-forget job.
Background job identifier is placed on a queue with the given name. When a queue name wasn't specified, the DefaultQueue name will be used. Message queue implementation depends on a current JobStorage instance.
var client = new BackgroundJobClient(); var state = new EnqueuedState("critical"); // Use the "critical" queue client.Create(() => Console.WriteLine("Hello!"), state);