Method Create
- Namespace
- MailFathom.Application.Jobs.Execution
- Assembly
- MailFathom.Application.dll
Create(int, TimeSpan, TimeSpan, int, TimeSpan, TimeSpan)
States the bounds one pass runs under.
public static JobExecutionSettings Create(int batchSize, TimeSpan leaseDuration, TimeSpan executionTimeout, int maxAttempts, TimeSpan retryBaseDelay, TimeSpan retryMaxDelay)
Parameters
batchSizeintThe greatest number of jobs one pass takes.
leaseDurationTimeSpanHow long a claim holds each job it takes.
executionTimeoutTimeSpanHow long one job may run before it is cancelled.
maxAttemptsintHow many attempts one job may be handed out for.
retryBaseDelayTimeSpanThe delay the first retry is drawn around.
retryMaxDelayTimeSpanThe ceiling a grown retry delay never exceeds.
Returns
- JobExecutionSettings
The validated bounds.
Exceptions
- ArgumentOutOfRangeException
Thrown when
batchSizeormaxAttemptsis not positive, when a duration is not positive, whenexecutionTimeoutis not shorter thanleaseDuration, or whenretryMaxDelayis belowretryBaseDelay.