mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:57:22 +01:00
more redis fixes
This commit is contained in:
parent
3cdaa53a65
commit
56728d1fba
4 changed files with 21 additions and 8 deletions
|
|
@ -690,7 +690,9 @@ public class DiscordBot : IHostedService
|
|||
updateStatusCts = new();
|
||||
while (!updateStatusCts.IsCancellationRequested)
|
||||
{
|
||||
await discordClient.SetActivityAsync(new Game("Mare for " + clientService.GetOnlineUsers() + " Users")).ConfigureAwait(false);
|
||||
var onlineUsers = clientService.GetOnlineUsers();
|
||||
logger.LogInformation("Users online: " + onlineUsers);
|
||||
await discordClient.SetActivityAsync(new Game("Mare for " + onlineUsers + " Users")).ConfigureAwait(false);
|
||||
await Task.Delay(TimeSpan.FromSeconds(15)).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class Startup
|
|||
services.AddStackExchangeRedisCache(opt =>
|
||||
{
|
||||
opt.Configuration = redis;
|
||||
opt.InstanceName = "MareSynchronos";
|
||||
opt.InstanceName = "MareSynchronosCache:";
|
||||
});
|
||||
services.AddSingleton<IClientIdentificationService, DistributedClientIdentificationService>();
|
||||
services.AddHostedService(p => p.GetService<IClientIdentificationService>());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue