Method SaveResumePositionAsync
- Namespace
- MailFathom.Application.Emails.Extraction
- Assembly
- MailFathom.Application.dll
SaveResumePositionAsync(IPersistenceSession, StoredEmailId, CancellationToken)
Records how far this run has come, so an interrupted backfill resumes instead of restarting.
Task SaveResumePositionAsync(IPersistenceSession session, StoredEmailId position, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe explicit persistence session this write participates in.
positionStoredEmailIdThe last email the batch processed.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task
A task that completes when the write has been staged.
Remarks
Staged in the same session as the batch's extractions, so a committed position always describes work that is itself committed and a crash between the two cannot skip an email.