🚚 Use capitalized connection strings

This commit is contained in:
2025-12-21 20:12:53 +08:00
parent 4c65602465
commit a49d485943
2 changed files with 5 additions and 5 deletions

View File

@@ -4,8 +4,8 @@ var builder = DistributedApplication.CreateBuilder(args);
var isDev = builder.Environment.IsDevelopment(); var isDev = builder.Environment.IsDevelopment();
var cache = builder.AddRedis("cache"); var cache = builder.AddRedis("Cache");
var queue = builder.AddNats("queue").WithJetStream(); var queue = builder.AddNats("Queue").WithJetStream();
var ringService = builder.AddProject<Projects.DysonNetwork_Ring>("ring"); var ringService = builder.AddProject<Projects.DysonNetwork_Ring>("ring");
var passService = builder.AddProject<Projects.DysonNetwork_Pass>("pass") var passService = builder.AddProject<Projects.DysonNetwork_Pass>("pass")

View File

@@ -48,9 +48,9 @@ public static class Extensions
builder.Services.AddSingleton<IClock>(SystemClock.Instance); builder.Services.AddSingleton<IClock>(SystemClock.Instance);
builder.AddNatsClient("queue"); builder.AddNatsClient("Queue");
builder.AddRedisClient( builder.AddRedisClient(
"cache", "Cache",
configureOptions: opts => configureOptions: opts =>
{ {
opts.AbortOnConnectFail = false; opts.AbortOnConnectFail = false;
@@ -60,7 +60,7 @@ public static class Extensions
// Setup cache service // Setup cache service
builder.Services.AddStackExchangeRedisCache(options => builder.Services.AddStackExchangeRedisCache(options =>
{ {
options.Configuration = builder.Configuration.GetConnectionString("cache"); options.Configuration = builder.Configuration.GetConnectionString("Cache");
options.InstanceName = "dyson:"; options.InstanceName = "dyson:";
}); });
builder.Services.AddSingleton<IDistributedLockFactory, RedLockFactory>(sp => builder.Services.AddSingleton<IDistributedLockFactory, RedLockFactory>(sp =>