Class JobEnqueueRequest
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
States one execution to be done later, in terms of state that is already committed.
public sealed record JobEnqueueRequest : IEquatable<JobEnqueueRequest>
- Inheritance
-
JobEnqueueRequest
- Implements
- Inherited Members
Remarks
The request accepts the identity of work over stored state and nothing an open synchronization transaction is still holding. That is the shape of the contract rather than a rule to remember: there is no property here to hand it a message it has not committed.
The job type is read from the payload rather than supplied beside it, because a type names exactly one payload contract and two values would make disagreeing about it possible.
Properties
- AvailableAt
Gets the instant before which the job is not claimable, or null to make it claimable at once.
- JobType
Gets the type of work, which is the one the payload is the contract of.
- Key
Gets the identity that decides whether this is a new execution or one already enqueued.
- Payload
Gets the references the work is described by.
Methods
- Create(JobIdempotencyKey, IJobPayload, MailAccountId?)
States an execution to be done as soon as a worker can take it.
- CreateAvailableAt(JobIdempotencyKey, IJobPayload, MailAccountId?, DateTimeOffset)
States an execution to be done no earlier than a given instant.