Bozza dopia scadenza giorno/ora per le statistiche

This commit is contained in:
Samuele Locatelli
2026-06-11 18:28:43 +02:00
parent 2594166efc
commit 1e7572a098
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.RIOC</RootNamespace>
<Version>8.16.2606.1117</Version>
<Version>8.16.2606.1118</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-RIOC </i>
<h4>Versione: 8.16.2606.1117</h4>
<h4>Versione: 8.16.2606.1118</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.1117
8.16.2606.1118
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.1117</version>
<version>8.16.2606.1118</version>
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -3
View File
@@ -299,9 +299,9 @@ namespace MP.RIOC.Services
var sKey = (RedisKey)$"{statKey}";
if (!TryParseKeyMetadata(sKey, out var meta) || !meta.IsHourType) continue;
// Verifica se la chiave è "orfana" (nessun TTL o TTL troppo lungo >30gg)
// Verifica se la chiave è "orfana" (nessun TTL o TTL troppo lungo >15gg)
var keyTtl = GetKeyTtl(sKey);
bool isOrphanKey = keyTtl?.TotalSeconds < 0 || keyTtl?.TotalHours > 30.25 * 24;
bool isOrphanKey = keyTtl?.TotalSeconds < 0 || keyTtl?.TotalHours > 15.25 * 24;
// Se era scaduta o orfana e abbiamo il permesso, segnamola per la cancellazione
if ((meta.Timestamp < currentHourStart || isOrphanKey) && deleteConfirmed)
@@ -326,7 +326,6 @@ namespace MP.RIOC.Services
dict.TryGetValue("totalMs", out var totalMsStr))
{
long count = long.Parse(countStr);
count = long.Parse(countStr);
double totalMs = double.Parse(totalMsStr, CultureInfo.InvariantCulture);
double maxMs = dict.ContainsKey("maxMs") ? double.Parse(dict["maxMs"], CultureInfo.InvariantCulture) : 0;