Fix conf lettura parametri

This commit is contained in:
Samuele Locatelli
2024-04-24 11:35:30 +02:00
parent 9d76ab8ecd
commit 65c041b711
10 changed files with 28 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2404.1509</Version>
<Version>6.16.2404.2411</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2404.1509</h4>
<h4>Versione: 6.16.2404.2411</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2404.1509
6.16.2404.2411
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2404.1509</version>
<version>6.16.2404.2411</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -1
View File
@@ -17,7 +17,8 @@
},
"OptConf": {
"msRefresh": "1100",
"CodModulo": "MP-TAB3"
"CodModulo": "MP-TAB3",
"CodModuloParam": "MoonPro"
},
"ServerConf": {
"BaseAddr": "https://localhost:7295/MP/TAB3/",
+17 -1
View File
@@ -73,6 +73,7 @@ namespace MP.Data.Services
Log.Info(sb.ToString());
// sistemo i parametri x redHas...
CodModulo = _configuration.GetValue<string>("OptConf:CodModulo");
CodModuloParam = _configuration.GetValue<string>("OptConf:CodModuloParam");
MpIoNS = _configuration.GetValue<string>("ServerConf:MpIoNS");
var cstringArray = ConnStr.Split(";");
foreach (var item in cstringArray)
@@ -1047,7 +1048,7 @@ namespace MP.Data.Services
sw.Start();
List<ObjItemDTO>? result = new List<ObjItemDTO>();
// cerco in redis...
string currKey = redHash($"CurrentParameters:{idxMacchina}");
string currKey = redHashParam($"CurrentParameters:{idxMacchina}");
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
@@ -3221,6 +3222,7 @@ namespace MP.Data.Services
private static Logger Log = LogManager.GetCurrentClassLogger();
private string CodModulo = "";
private string CodModuloParam = "";
private string MpIoNS = "";
private string ConnStr = "";
@@ -3322,6 +3324,20 @@ namespace MP.Data.Services
return result;
}
private string redHashParam(string keyName)
{
string result = keyName;
try
{
result = $"{CodModuloParam}:{DataSource}:{DataBase}:{keyName}".Replace("\\", "_");
}
catch (Exception exc)
{
Log.Error($"Errore in redHashParam{Environment.NewLine}{exc}");
}
return result;
}
private string redHashMpIO(string keyName)
{
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>6.16.2404.0510</Version>
<Version>6.16.2404.0510</Version>
<Version>6.16.2404.1616</Version>
<Version>6.16.2404.1616</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 6.16.2404.0510</h4>
<h4>Versione: 6.16.2404.1616</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2404.0510
6.16.2404.1616
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2404.0510</version>
<version>6.16.2404.1616</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>