Table of Contents

Class EmbeddingBackfillSchedule

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

When the embedding upkeep pass is next due, and the one way an operator's act brings it forward.

public sealed class EmbeddingBackfillSchedule
Inheritance
EmbeddingBackfillSchedule
Inherited Members

Remarks

The pause between passes is chosen by the pass that just ended, so nothing a later act writes can shorten it. An instance that has activated no profile ends every pass having found no generation to walk towards, which is the long idle interval; the activation that gives it one then commits a row a sleeping worker has no way to observe, and the first vectors of a reindex arrive whenever that unrelated interval happens to expire. This is the signal that closes that gap — the act that creates the work says so, and the worker waiting out the pause takes the next pass at once.

The instant is the other half of the same fact and is held here for the same reason: nothing else in the process knows it. An operator reading a deployment during that pause sees no vectors, no provider call, and no log line, and what tells a wait apart from a failure is being able to read when the wait ends.

One instance per process, because a pass is one thing the process does. It is deliberately not durable: what it carries is a decision the running worker has already made, so a restart correctly forgets it and the first pass of the new process schedules the next one.

Constructors

EmbeddingBackfillSchedule(TimeProvider)

Initializes a schedule holding no pass.

Properties

NextPassDueAt

Gets when the next pass is due, or null while no pass has been scheduled.

Methods

BringForward()

Asks for a pass now, releasing a worker that is waiting out the pause the last pass chose.

NoPassWillRun()

Reports that this process runs no pass at all, so nothing is scheduled and nothing can be asked for.

WaitForNextPassAsync(TimeSpan, CancellationToken)

Records that the next pass is due after the given pause, and waits for it.