Method GetEmailsAwaitingExtractionAsync
- Namespace
- MailFathom.Application.Emails.Extraction
- Assembly
- MailFathom.Application.dll
GetEmailsAwaitingExtractionAsync(StoredEmailId?, int, CancellationToken)
Reads the next bounded batch of stored emails whose MIME has never been read.
Task<IReadOnlyList<StoredEmailAwaitingExtraction>> GetEmailsAwaitingExtractionAsync(StoredEmailId? resumeAfter, int batchSize, CancellationToken cancellationToken)
Parameters
resumeAfterStoredEmailId?The position to continue past, or null to start at the beginning.
batchSizeintThe greatest number of emails to return.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<IReadOnlyList<StoredEmailAwaitingExtraction>>
The emails to extract, 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. An occurrence recorded without content has nothing to re-read, and returning it would make the backfill report work it can never complete.