Method RunAsync
- Namespace
- MailFathom.Application.Spam.Runs
- Assembly
- MailFathom.Application.dll
RunAsync(MailAccountId, CancellationToken)
Takes one bounded pass over the account's requested run, where it has one.
public Task<SpamClassificationRunReport> RunAsync(MailAccountId accountId, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose run is carried.
cancellationTokenCancellationTokenCancels the pass between messages and between batches; committed batches stay durable.
Returns
- Task<SpamClassificationRunReport>
What the pass did, and how the run ended where this pass ended it.
Remarks
The two ways a run ends without reaching the end of its mail are both decided here and before any message is read, because both are statements about the whole run rather than about one message: classification switched off, and a profile that has moved under a walk already half done.
Exceptions
- PersistenceConcurrencyConflictException
Thrown when a competing writer wins a race the bounded retries could not resolve. Batches already committed stay durable and the next account run resumes from them.
- OperationCanceledException
Thrown when the caller cancels. Committed batches stay durable.