Skip to content

InfluxRetryService

Namespace: Database.Repository.InfluxRepo

Background service that periodically retries failed InfluxDB writes from the memory cache.
Runs every 5 minutes to attempt flushing cached PointData objects to InfluxDB.

public class InfluxRetryService : Microsoft.Extensions.Hosting.BackgroundService, Microsoft.Extensions.Hosting.IHostedService, System.IDisposable

Inheritance Object → BackgroundService → InfluxRetryService

Implements IHostedService, IDisposable

Properties

ExecuteTask

public Task ExecuteTask { get; }

Property Value

Task

Constructors

InfluxRetryService(IServiceScopeFactory, ILogger<InfluxRetryService>)

Constructor for the InfluxRetryService.

public InfluxRetryService(IServiceScopeFactory serviceScopeFactory, ILogger<InfluxRetryService> logger)

Parameters

serviceScopeFactory IServiceScopeFactory

Factory for creating service scopes

logger ILogger<InfluxRetryService>

Logger instance

Methods

ExecuteAsync(CancellationToken)

Main execution loop for the background service.

protected Task ExecuteAsync(CancellationToken stoppingToken)

Parameters

stoppingToken CancellationToken

Cancellation token

Returns

Task