Table of Contents

Method CreateAvailableAt

Namespace
MailFathom.Application.Jobs
Assembly
MailFathom.Application.dll

CreateAvailableAt(JobIdempotencyKey, IJobPayload, MailAccountId?, DateTimeOffset)

States an execution to be done no earlier than a given instant.

public static JobEnqueueRequest CreateAvailableAt(JobIdempotencyKey key, IJobPayload payload, MailAccountId? accountId, DateTimeOffset availableAt)

Parameters

key JobIdempotencyKey

The identity of the execution, composed by whoever knows the work.

payload IJobPayload

The references the work is described by.

accountId MailAccountId?

The account the work belongs to, or null when it belongs to none.

availableAt DateTimeOffset

The instant before which no worker may claim the job.

Returns

JobEnqueueRequest

The request to enqueue.

Remarks

An instant already past is accepted and means the same as none: the claim compares the column against the database's clock, so a job is never made unclaimable by having been scheduled late.

Exceptions

ArgumentNullException

Thrown when key or payload is null.

ArgumentException

Thrown when the payload names no declared job type.