Method ActivateAsync
- Namespace
- MailFathom.Application.Emails.Embeddings.Generations
- Assembly
- MailFathom.Application.dll
ActivateAsync(EmbeddingProfileIdentity, CancellationToken)
Registers the declared geometry as the generation to build, unless one of it is already there.
public Task<EmbeddingProfileActivationResult> ActivateAsync(EmbeddingProfileIdentity declared, CancellationToken cancellationToken)
Parameters
declaredEmbeddingProfileIdentityThe geometry configuration declares, which the fingerprint resolves a profile through.
cancellationTokenCancellationTokenCancels the reads and the registration.
Returns
- Task<EmbeddingProfileActivationResult>
What the activation did, and which generation it did it to.
Exceptions
- ArgumentNullException
Thrown when
declaredis null.- EmbeddingVectorIndexFailedException
Thrown when the registration committed but the database refused to build the generation's approximate index. The generation is registered and the reindex will run; searching it stays exact until an activation of the same declaration builds the index, which is why repeating the command is what repairs this.
- PersistenceConcurrencyConflictException
Thrown when a competing writer wins a race the bounded retries could not resolve and which was not another activation: losing to one of those is reported as an outcome rather than raised, because what the operator has to know is which generation is being built rather than that two commands collided.
- OperationCanceledException
Thrown when the caller cancels.