Table of Contents

Method GetEmailsToRederiveAsync

Namespace
MailFathom.Application.Mail.Maintenance
Assembly
MailFathom.Application.dll

GetEmailsToRederiveAsync(StoredMailScope, StoredEmailId?, int, CancellationToken)

Reads the next bounded batch of stored emails whose MIME this pass re-reads.

Task<IReadOnlyList<StoredMailAwaitingRederivation>> GetEmailsToRederiveAsync(StoredMailScope scope, StoredEmailId? resumeAfter, int batchSize, CancellationToken cancellationToken)

Parameters

scope StoredMailScope

The account, and the one folder of it, being walked.

resumeAfter StoredEmailId?

The position to continue past, or null to start at the beginning.

batchSize int

The greatest number of emails to return.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<StoredMailAwaitingRederivation>>

The emails to re-read, in the stable order the resume position is expressed in, and never more than batchSize.

Remarks

Only emails whose raw MIME is actually stored are returned, and a row a tombstone hides is left out. The first has nothing this pass could re-read, and the second is mail nothing may retrieve, which is the same rule both backfills over stored mail already apply.