Method ReadActiveAsync
- Namespace
- MailFathom.Application.Mail.Delivery.Scheduling
- Assembly
- MailFathom.Application.dll
ReadActiveAsync(int, CancellationToken)
Reads what the dispatch needs about the declarations that still produce occurrences.
Task<IReadOnlyList<RecurringSendDeclaration>> ReadActiveAsync(int limit, CancellationToken cancellationToken)
Parameters
limitintThe greatest number of declarations to return.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<RecurringSendDeclaration>>
The active declarations, oldest first, at most
limitof them.
Remarks
This is what the recurring dispatch reads on every pass, so the bound is what stops a deployment that declared more repetitions than a pass can carry from making that pass unbounded. It is a page rather than a cut only in the sense every other bounded query is: what a pass does not reach this time it reaches on the next one. What it answers with is the projection rather than the declaration, so a decision taken every interval never loads the addresses it does not read.
Exceptions
- ArgumentOutOfRangeException
Thrown when
limitis not positive.