Table of Contents

Method SaveResumePositionAsync

Namespace
MailFathom.Application.Emails.Embeddings.Backfill
Assembly
MailFathom.Application.dll

SaveResumePositionAsync(IPersistenceSession, StoredEmailId?, CancellationToken)

Records how far this sweep has come, or ends the sweep so the next one starts at the beginning.

Task SaveResumePositionAsync(IPersistenceSession session, StoredEmailId? position, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session whose transaction this write joins.

position StoredEmailId?

The last message processed, or null to end the sweep.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task

A task that completes when the write has been staged.

Remarks

A null position is what makes this backfill a repeating sweep rather than a walk that finishes once. A message a provider refused keeps passages without vectors and the walk has already stepped past it, so without a sweep that starts again those passages would never be reached; ending the sweep is what promises they are.