Added policy messages for WS. Fixed DB changes via stores. Updated chat voices messages via WS to use stores.

This commit is contained in:
Tom
2024-10-21 20:44:20 +00:00
parent e3c78d96fa
commit 94e0d54c31
19 changed files with 255 additions and 137 deletions

View File

@ -1,3 +1,4 @@
using HermesSocketLibrary.db;
using HermesSocketServer.Store;
namespace HermesSocketServer.Services
@ -29,15 +30,15 @@ namespace HermesSocketServer.Services
await Task.Run(async () =>
{
await Task.Delay(TimeSpan.FromSeconds(_configuration.Database.SaveDelayInSeconds));
while (true)
{
await Task.WhenAll([
_voices.Save(),
_users.Save(),
_channels.Save(),
Task.Delay(TimeSpan.FromSeconds(_configuration.Database.SaveDelayInSeconds)),
]);
await Task.Delay(TimeSpan.FromSeconds(_configuration.Database.SaveDelayInSeconds));
}
});
}