Table of Contents

Method RemoveForgottenAsync

Namespace
MailFathom.Application.Discovery.Streaming
Assembly
MailFathom.Application.dll

RemoveForgottenAsync(DateTimeOffset, CancellationToken)

Removes the runs nobody can come back for, and the ones no execution can still be reporting.

Task<int> RemoveForgottenAsync(DateTimeOffset now, CancellationToken cancellationToken)

Parameters

now DateTimeOffset

The instant both windows are measured against.

cancellationToken CancellationToken

Cancels the removal.

Returns

Task<int>

How many runs were removed, which is a count and never anything about them.

Remarks

Two windows rather than one, for the reason the run's bounds state: a run that has ended goes RetentionAfterLastUse after it was last read, and one that never reported at all goes at the longest a run may take and that window together — the replica executing it having gone away without ending it. Every event the run wrote goes with the run.