Nope Redis still borked.
This commit is contained in:
@@ -8,6 +8,7 @@ using GameServices.Admin.Pages;
|
|||||||
using GameServices.Auth;
|
using GameServices.Auth;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
|
using Microsoft.AspNetCore.DataProtection.KeyManagement;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@@ -111,6 +112,13 @@ builder.Services.AddDataProtection()
|
|||||||
//}
|
//}
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
var keyManager = app.Services.GetRequiredService<IKeyManager>();
|
||||||
|
var keys = keyManager.GetAllKeys();
|
||||||
|
app.Logger.LogInformation("DP keys present: {Count}", keys.Count);
|
||||||
|
foreach (var k in keys)
|
||||||
|
app.Logger.LogInformation("DP key: {Id} Created={Created} Expires={Expires} Revoked={Revoked}",
|
||||||
|
k.KeyId, k.CreationDate, k.ExpirationDate, k.IsRevoked);
|
||||||
|
|
||||||
var dungeonHandler = app.Services.GetRequiredService<DungeonHandler>();
|
var dungeonHandler = app.Services.GetRequiredService<DungeonHandler>();
|
||||||
await dungeonHandler.InitializeAsync();
|
await dungeonHandler.InitializeAsync();
|
||||||
|
|
||||||
|
|||||||
+18
-18
@@ -180,28 +180,28 @@ public sealed class RedisManager : IRedisManager
|
|||||||
if (!string.IsNullOrWhiteSpace(password)) cs += $",password={password}";
|
if (!string.IsNullOrWhiteSpace(password)) cs += $",password={password}";
|
||||||
return cs;
|
return cs;
|
||||||
}
|
}
|
||||||
public async Task FlushDatabaseAsync()
|
//public async Task FlushDatabaseAsync()
|
||||||
{
|
//{
|
||||||
// Redis flush commands are server-level, not IDatabase-level
|
// // Redis flush commands are server-level, not IDatabase-level
|
||||||
var endpoints = _mux.GetEndPoints();
|
// var endpoints = _mux.GetEndPoints();
|
||||||
|
|
||||||
foreach (var endpoint in endpoints)
|
// foreach (var endpoint in endpoints)
|
||||||
{
|
// {
|
||||||
var server = _mux.GetServer(endpoint);
|
// var server = _mux.GetServer(endpoint);
|
||||||
|
|
||||||
if (!server.IsConnected)
|
// if (!server.IsConnected)
|
||||||
continue;
|
// continue;
|
||||||
|
|
||||||
if (server.IsReplica)
|
// if (server.IsReplica)
|
||||||
{
|
// {
|
||||||
_logger.LogDebug("Skipping replica endpoint {Endpoint}", endpoint);
|
// _logger.LogDebug("Skipping replica endpoint {Endpoint}", endpoint);
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
_logger.LogWarning("FLUSHDB issued on Redis endpoint {Endpoint}", endpoint);
|
// _logger.LogWarning("FLUSHDB issued on Redis endpoint {Endpoint}", endpoint);
|
||||||
await server.FlushDatabaseAsync(Db.Database);
|
// await server.FlushDatabaseAsync(Db.Database);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user