Using _redis multiplexer instead of DIing it

This commit is contained in:
2025-09-14 00:40:45 +01:00
parent b987a58caa
commit f07fd3990b

View File

@@ -25,7 +25,7 @@ public class SystemInfoService : IHostedService, IDisposable
public SystemInfoDto SystemInfoDto { get; private set; } = new();
public SystemInfoService(MareMetrics mareMetrics, IConfigurationService<ServerConfiguration> configurationService, IServiceProvider services,
ILogger<SystemInfoService> logger, IHubContext<MareHub, IMareHub> hubContext, IRedisDatabase redisDb, IConnectionMultiplexer connectionMultiplexer)
ILogger<SystemInfoService> logger, IHubContext<MareHub, IMareHub> hubContext, IRedisDatabase redisDb)
{
_mareMetrics = mareMetrics;
_config = configurationService;
@@ -33,7 +33,7 @@ public class SystemInfoService : IHostedService, IDisposable
_logger = logger;
_hubContext = hubContext;
_redis = redisDb;
_connectionMultiplexer = connectionMultiplexer;
_connectionMultiplexer = _redis.Database.Multiplexer;
}
public Task StartAsync(CancellationToken cancellationToken)