diff --git a/MP.Data/MessagePipe.cs b/MP.Data/MessagePipe.cs index 098cdc4e..a7503be2 100644 --- a/MP.Data/MessagePipe.cs +++ b/MP.Data/MessagePipe.cs @@ -90,7 +90,7 @@ namespace MP.Data //Subscribe to the channel named messages sub.Subscribe(_channel, (channel, message) => { - Log.Trace($"ch {channel} | {message}"); + Log.Trace($"req setup ch {channel} | {message}"); // messaggio PubSubEventArgs mea = new PubSubEventArgs(message); // se qualcuno ascolta sollevo evento nuovo valore... diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 12805cc6..6297fedb 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -29,10 +29,6 @@ namespace MP.SPEC.Data _logger.LogInformation("Redis INIT"); - // setup canali pub/sub - dataPipe = new MessagePipe(redisConn, Constants.ACT_MSE_DATA_KEY); - blinkPipe = new MessagePipe(redisConn, Constants.ACT_BLINK_KEY); - // conf DB string connStr = _configuration.GetConnectionString("Mp.Data"); if (string.IsNullOrEmpty(connStr)) @@ -52,14 +48,11 @@ namespace MP.SPEC.Data public static MP.Data.Controllers.MpSpecController dbController { get; set; } = null!; - public MessagePipe blinkPipe { get; set; } = null!; - /// /// Dizionario dei tag configurati per IOB /// public Dictionary> currTagConf { get; set; } = new Dictionary>(); - public MessagePipe dataPipe { get; set; } = null!; #endregion Public Properties @@ -100,15 +93,14 @@ namespace MP.SPEC.Data { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); + string source = "DB"; List? result = new List(); // cerco in redis... RedisValue rawData = await redisDb.StringGetAsync(redisTipoArt); if (!string.IsNullOrEmpty($"{rawData}")) { result = JsonConvert.DeserializeObject>($"{rawData}"); - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"AnagTipoArtLV Read from REDIS: {ts.TotalMilliseconds}ms"); + source = "REDIS"; } else { @@ -116,10 +108,10 @@ namespace MP.SPEC.Data // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); await redisDb.StringSetAsync(redisTipoArt, rawData, getRandTOut(redisLongTimeCache)); - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Debug($"AnagTipoArtLV Read from DB: {ts.TotalMilliseconds}ms"); } + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Debug($"AnagTipoArtLV Read from {source}: {ts.TotalMilliseconds}ms"); if (result == null) { result = new List(); @@ -197,7 +189,7 @@ namespace MP.SPEC.Data result = await Task.FromResult(dbController.ArticoliGetSearch(numRecord, azienda, searchVal)); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache/5)); + redisDb.StringSet(currKey, rawData, getRandTOut(redisLongTimeCache / 5)); } if (result == null) { diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 64c4f598..27a3af44 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.2017 + 6.16.2210.2109 diff --git a/MP.SPEC/NLog.config b/MP.SPEC/NLog.config index 3e4185f4..b32ba10a 100644 --- a/MP.SPEC/NLog.config +++ b/MP.SPEC/NLog.config @@ -39,7 +39,7 @@ Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f" --> - + diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 2728c632..889923ac 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2210.2017

+

Versione: 6.16.2210.2109


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 8564b4af..51b08b69 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.2017 +6.16.2210.2109 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 286026b9..81a51989 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.2017 + 6.16.2210.2109 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false diff --git a/MP.SPEC/appsettings.json b/MP.SPEC/appsettings.json index 098b7be2..b8e6b52e 100644 --- a/MP.SPEC/appsettings.json +++ b/MP.SPEC/appsettings.json @@ -14,8 +14,8 @@ }, "ServerConf": { "maxAge": "2000", - "cacheCheckArtUsato": 2, - "redisLongTimeCache": 15, + "cacheCheckArtUsato": "2", + "redisLongTimeCache": "15", "MpIoBaseUrl": "http://localhost:20967/" } }