Method FindLatestAsync
- Namespace
- MailFathom.Application.Spam.Runs
- Assembly
- MailFathom.Application.dll
FindLatestAsync(MailAccountId, CancellationToken)
Reads the run this account last had, whether it is still outstanding or has ended.
Task<SpamClassificationRun?> FindLatestAsync(MailAccountId accountId, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account to read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<SpamClassificationRun>
The run, or null when the account has never been asked for one.
Remarks
What an operator asking after the run they started reads. A run that has finished is exactly as much of an answer as one still going, so reporting only the outstanding one would leave "it completed an hour ago" and "you never asked" looking identical from the outside.