Class PendingTaxRecalculationJob
- Namespace
- Integrations.Application.Tax
- Assembly
- Integrations.Application.dll
Finishes documents that were deferred while the tax provider was unavailable. Each document runs in its own scope so one failure cannot affect the others. Documents back off exponentially (see TaxDocument.MarkPending).
public sealed class PendingTaxRecalculationJob : IScheduledJob
- Inheritance
-
PendingTaxRecalculationJob
- Implements
- Inherited Members
Constructors
PendingTaxRecalculationJob(TaxService, IServiceScopeFactory, IOptions<TaxOptions>, ILogger<PendingTaxRecalculationJob>)
Finishes documents that were deferred while the tax provider was unavailable. Each document runs in its own scope so one failure cannot affect the others. Documents back off exponentially (see TaxDocument.MarkPending).
public PendingTaxRecalculationJob(TaxService tax, IServiceScopeFactory scopes, IOptions<TaxOptions> options, ILogger<PendingTaxRecalculationJob> logger)
Parameters
taxTaxServicescopesIServiceScopeFactoryoptionsIOptions<TaxOptions>loggerILogger<PendingTaxRecalculationJob>
Properties
Interval
Time between runs.
public TimeSpan Interval { get; }
Property Value
Name
Unique job name, used in logs, metrics and the advisory lock.
public string Name { get; }
Property Value
Methods
RunAsync(CancellationToken)
Runs once. Only one replica runs a job at a time.
public Task RunAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken