Method RunAsync
- Namespace
- MailFathom.Application.Jobs.Scheduling
- Assembly
- MailFathom.Application.dll
RunAsync(CancellationToken)
Decides about every declared schedule, and enqueues the ones whose occasion has passed.
public Task<IReadOnlyList<JobScheduleDispatch>> RunAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancels the pass between schedules.
Returns
- Task<IReadOnlyList<JobScheduleDispatch>>
One decision per declared schedule, in declared order, and an empty answer when none is declared.
Remarks
The schedules are decided one after another rather than together, because each is one read, one enqueue, and one small write, and a deployment declares as many of them as it has rules — a count where doing them in order costs nothing and keeps the queue's depth bound reached in a defined order.