Method ReadOutstandingAsync
- Namespace
- MailFathom.Application.Mail.Mutations
- Assembly
- MailFathom.Application.dll
ReadOutstandingAsync(MailAccountId, int, CancellationToken)
Reads the mutations of one account that have not completed, with the folder binding each was recorded against.
Task<IReadOnlyList<OutstandingMailboxMutation>> ReadOutstandingAsync(MailAccountId accountId, int limit, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose mutations are read.
limitintThe greatest number of records to return.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<OutstandingMailboxMutation>>
The outstanding records, oldest first, at most
limitof them.
Remarks
An abandoned mutation is part of the answer rather than excluded from it. Reaching a terminal failed stage is what stops a change being retried, and it would be worth nothing if it also stopped the change being seen: the operator's question is which changes are in flight and which are stuck, and a mutation nothing will attempt again is the second kind. Only a completed one leaves this answer.
Oldest first, because the answer starts with whatever has been outstanding longest. It is bounded like every other public query, and convergence treats the bound as a page it comes back for rather than as a cut.
Exceptions
- ArgumentOutOfRangeException
Thrown when
limitis not positive.