Aggiunta metodo GetIdlePeriod

This commit is contained in:
Samuele Locatelli
2026-04-15 18:41:22 +02:00
parent 257ddbf775
commit a0eeac59f0
5 changed files with 113 additions and 27 deletions
+6 -2
View File
@@ -320,6 +320,10 @@ namespace MP.Data.Services
return answ;
}
/// <summary>
/// Elenco da tabella MappaStatoExplModel
/// </summary>
/// <returns></returns>
public async Task<List<MappaStatoExplModel>> MseGetAll(bool forceDb = false)
{
Stopwatch sw = new Stopwatch();
@@ -327,10 +331,10 @@ namespace MP.Data.Services
sw.Start();
List<MappaStatoExplModel>? result = new List<MappaStatoExplModel>();
// cerco in _redisConn...
RedisValue rawData = redisDb.StringGet(Constants.redisMseKey);
RedisValue rawData = await redisDb.StringGetAsync(Constants.redisMseKey);
if (rawData.HasValue && !forceDb)
{
result = JsonConvert.DeserializeObject<List<MappaStatoExplModel>>($"{rawData}");
result = JsonConvert.DeserializeObject<List<MappaStatoExplModel>>($"{rawData}") ?? new();
source = "REDIS";
}
else