Method ReadWaitingDepthsAsync
- Namespace
- MailFathom.Application.Jobs.Execution
- Assembly
- MailFathom.Application.dll
ReadWaitingDepthsAsync(IReadOnlyList<JobType>, CancellationToken)
Measures what is waiting for each of the types named.
Task<IReadOnlyList<JobQueueDepthReading>> ReadWaitingDepthsAsync(IReadOnlyList<JobType> jobTypes, CancellationToken cancellationToken)
Parameters
jobTypesIReadOnlyList<JobType>The types to measure, ordinarily the ones this process can run.
cancellationTokenCancellationTokenCancels the reads.
Returns
- Task<IReadOnlyList<JobQueueDepthReading>>
One reading per type named, in the order they were named.
Remarks
A type with nothing waiting is reported as zero rather than left out, so a queue that emptied stops reporting its last non-zero depth.
Exceptions
- ArgumentNullException
Thrown when
jobTypesis null.