Table of Contents

Method CountEmailsAwaitingEmbeddingAsync

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

CountEmailsAwaitingEmbeddingAsync(EmbeddingProfileId, CancellationToken)

Counts the messages that still have passages without a vector under the given profile.

Task<int> CountEmailsAwaitingEmbeddingAsync(EmbeddingProfileId profileId, CancellationToken cancellationToken)

Parameters

profileId EmbeddingProfileId

The profile whose vectors decide what is outstanding.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<int>

How many stored messages the sweep about to start has to reach.

Remarks

Asked once at the start of a sweep and never per run, because it is an unbounded count over every passage and the answer only has to be good enough for an operator to see the size of what they are paying for. What it counts is the whole sweep rather than what is left in front of the position, so the number an operator reads is the one the progress counters are measured against.