From fd665352495f24de4ca2d6ea220f10bfade55f4d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 28 May 2025 17:18:31 +0200 Subject: [PATCH] =?UTF-8?q?Update=20modalit=C3=A0=20track=20data=20con=20d?= =?UTF-8?q?ettaglio=20log=20completo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IOB-UT-NEXT/RedisMan.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/IOB-UT-NEXT/RedisMan.cs b/IOB-UT-NEXT/RedisMan.cs index 58cf1ac5..f183873c 100644 --- a/IOB-UT-NEXT/RedisMan.cs +++ b/IOB-UT-NEXT/RedisMan.cs @@ -818,6 +818,33 @@ namespace IOB_UT_NEXT return answ; } + /// + /// Salvataggio di una hash di valori + /// + /// chiave + /// valori + /// scadenza preimpostata hash datetime, se null NON scade + /// + public bool redSaveHash(string hashKey, KeyValuePair[] hashFields, DateTime? hashExpire) + { + bool answ = false; + // cerco se ci sia valore in redis... + try + { + RedisKey chiave = hashKey; + answ = redSaveHash(hashKey, hashFields); + if (hashExpire != null) + { + cache.KeyExpire(chiave, hashExpire); + } + } + catch (Exception exc) + { + Logging.Instance.Error($"redSaveHash {exc}"); + } + return answ; + } + /// /// Salvataggio di una hash di valori /// @@ -1324,7 +1351,7 @@ namespace IOB_UT_NEXT // init dati di base... redServKey = redHash($"MP"); redIobKey = redHash($"IOB:{currCodIob}"); - redIobTrackKey = redHash($"IOB:Track:{currCodIob}"); + redIobTrackKey = redHash($"IOB:FluxLog:{currCodIob}"); redIobChannel = $"IobChannel_{currCodIob}"; }