Method FindDueForExpiryAsync
- Namespace
- MailFathom.Application.Mail.Export
- Assembly
- MailFathom.Application.dll
FindDueForExpiryAsync(DateTimeOffset, int, CancellationToken)
Names the completed exports whose retention period has run out.
Task<IReadOnlyList<MailboxExport>> FindDueForExpiryAsync(DateTimeOffset asOf, int limit, CancellationToken cancellationToken)
Parameters
asOfDateTimeOffsetThe instant expiry is judged against.
limitintHow many to name at most, which bounds one pass.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<MailboxExport>>
The exports whose archives are due to be deleted.
Remarks
Read from the recorded expiry rather than from a timer held in one process, which is what makes expiry survive a restart and a replica ending.
Exceptions
- ArgumentOutOfRangeException
Thrown when
limitis not positive.