Table of Contents

Interface IJobScheduleStore

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

Keeps what each recurring dispatch has already done, so an occasion survives the process that noticed it.

public interface IJobScheduleStore

Remarks

No method here takes a persistence session, for the reason IJobStore takes none: a schedule is advanced against work that is already enqueued, so there is nothing for a caller to enlist this in.

Two replicas can advance one schedule at the same instant, and that is safe rather than guarded: both compose the same idempotency key for the same occasion, so the queue answers the second with the job the first wrote. The write here is therefore last-one-wins over a value both writers agree on.

Methods

ReadAsync(IReadOnlyCollection<JobScheduleId>, CancellationToken)

Reads what these schedules have already done.

SaveAsync(JobScheduleState, CancellationToken)

Writes what a schedule has now done, inserting the row when the schedule had none.