Merge branch 'release/ChangeRedisConfig01'
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.0.2407.2415</Version>
|
||||
<Version>1.0.2407.2417</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -128,7 +128,6 @@ namespace GWMS.UI.Health
|
||||
description += $" - {pingResult.RoundtripTime}ms";
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
|
||||
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
|
||||
}
|
||||
}
|
||||
|
||||
+20
-2
@@ -17,6 +17,7 @@ using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace GWMS.UI
|
||||
{
|
||||
@@ -210,10 +211,27 @@ namespace GWMS.UI
|
||||
// options.ConnectionString = elmaConn;
|
||||
//});
|
||||
|
||||
// spacchetto conf redis che è cache prima maniera...
|
||||
var redisConfData = connStringRedis.Split(",");
|
||||
int redisDb = 13;
|
||||
int redisPort = 6379;
|
||||
if(redisConfData.Length > 0)
|
||||
{
|
||||
string recDb = redisConfData.First(x => x.StartsWith("DefaultDatabase"));
|
||||
if (recDb != null)
|
||||
{
|
||||
int.TryParse(recDb.Replace("DefaultDatabase=", ""), out redisDb);
|
||||
}
|
||||
string recPort = redisConfData.First(x => x.Contains(":"));
|
||||
if (recPort != null)
|
||||
{
|
||||
int.TryParse(recPort.Replace($"{redisSrvAddr}:", ""), out redisPort);
|
||||
}
|
||||
}
|
||||
|
||||
services.AddStackExchangeRedisCache(options =>
|
||||
{
|
||||
//options.Configuration = "localhost:6379";
|
||||
options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = 12, EndPoints = { { "localhost", 6379 } } };
|
||||
options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = redisDb, EndPoints = { { redisSrvAddr, redisPort } } };
|
||||
options.InstanceName = "GWMS:";
|
||||
});
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
"Redis": "redis01.ovh:6379, DefaultDatabase=13, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, allowAdmin=true",
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
"Server": "localhost",
|
||||
"Server": "mdb.ovh",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"GWMS.Data": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
|
||||
},
|
||||
"DbConfig": {
|
||||
"Server": "mdb.ovh",
|
||||
"Server": "localhost",
|
||||
"nKey": "PZZFRR",
|
||||
"sKey": "M3T@n0"
|
||||
},
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "localhost:6379",
|
||||
"Redis": "localhost:6379, DefaultDatabase=13, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, allowAdmin=true",
|
||||
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"DefaultConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
|
||||
"AdminConnection": "Server=localhost;port=3306;database=GWMS;user=root;pwd=Egalware_24068!;sslmode=None;",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2407.2415</h4>
|
||||
<h4>Versione: 1.0.2407.2417</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2407.2415
|
||||
1.0.2407.2417
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2407.2415</version>
|
||||
<version>1.0.2407.2417</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user