Table of Contents

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

tax TaxService
scopes IServiceScopeFactory
options IOptions<TaxOptions>
logger ILogger<PendingTaxRecalculationJob>

Properties

Interval

Time between runs.

public TimeSpan Interval { get; }

Property Value

TimeSpan

Name

Unique job name, used in logs, metrics and the advisory lock.

public string Name { get; }

Property Value

string

Methods

RunAsync(CancellationToken)

Runs once. Only one replica runs a job at a time.

public Task RunAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task