Method FindStateAsync
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
FindStateAsync(JobId, CancellationToken)
Reads where one job stands, which is what a caller holding an identifier asks before acting on it.
Task<JobState?> FindStateAsync(JobId jobId, CancellationToken cancellationToken)
Parameters
jobIdJobIdThe job to read.
cancellationTokenCancellationTokenCancels the read.
Returns
Remarks
A reading rather than a guarantee. The state can move the instant after it is read, so what it supports is a decision that is safe to get wrong occasionally — a recurring dispatch standing down while the previous one is still going, where an unlucky read costs one occasion — and never an exclusion, which is what the lease is for.