10 Commits

Author SHA1 Message Date
Samuele Locatelli 4ce79a88c3 Merge branch 'release/AddRetryMysql' 2024-04-15 19:35:11 +02:00
Samuele Locatelli d1dc1436bb Refresh generale 2024-04-15 19:34:39 +02:00
Samuele Locatelli 3f889940b9 Aggiunta opzione x riprovare chiamata in caso di errore connessione x 10 sec 2024-04-15 19:34:36 +02:00
Samuele Locatelli 257ad739df Update puntamento DB su lb ufficio 2024-04-15 19:34:17 +02:00
Samuele Locatelli badd6d16f7 Update x pulizia (ulteriore) file log x decoder 2024-04-15 11:16:50 +02:00
Samuele Locatelli 7d84defb68 Fix config x DB Cluster in ufficio 2024-04-12 16:21:27 +02:00
Samuele Locatelli dd212d5c1b Merge tag 'AddSentinelLocalhost' into develop
Aggiunto sentinel su localhost
2024-03-16 12:06:55 +01:00
Samuele Locatelli 3b62b84bc2 Merge branch 'release/AddSentinelLocalhost' 2024-03-16 12:06:46 +01:00
Samuele Locatelli cc74087ba0 Fix UI x usare redis sentinel da localhost 2024-03-16 12:06:14 +01:00
Samuele Locatelli 326c35cc0d Fix configurazione redis su sentinel server 2024-03-15 17:35:45 +01:00
28 changed files with 102 additions and 32 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=nkc.password",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=nkc.password",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Egalware_24068!;sslmode=None;",
+1 -1
View File
@@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
+1 -1
View File
@@ -6,7 +6,7 @@
}
},
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.2.2308.2118</Version>
<Version>1.2.2404.1519</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.2.2308.2118</h4>
<h4>Version: 1.2.2404.1519</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.2.2308.2118
1.2.2404.1519
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.2.2308.2118</version>
<version>1.2.2404.1519</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+25 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.2.2308.2118</Version>
<Version>1.2.2404.1519</Version>
</PropertyGroup>
<ItemGroup>
@@ -48,12 +48,36 @@
<None Update="logs\.placeholder.file">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\2024-04-12.000.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stderr.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdin.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20220406T180136.000.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T141651.019.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T142243.257.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T142458.717.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T142500.902.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T142502.436.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout-20240412T142503.297.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="logs\stdout.log">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+33 -1
View File
@@ -100,6 +100,8 @@ int DbSampleInt = 60;
int BlinkPeriodMSec = 1000;
bool AlarmLogActive = false;
int NumDay2Keep = 180;
string LogFolder = Path.Combine(Directory.GetCurrentDirectory(), config["OptPar:LogFolder"]);
int LogMaxAgeDays = config.GetValue<int>("OptPar:LogMaxAgeDays");
setupConf();
// datetime dell'inizio esecuzione task... x usare un semaforo di veto doppia esecuzione entro 30 sec
@@ -122,6 +124,8 @@ Thread threadDbMaint = new Thread(dbMaintenance);
threadDbMaint.Start();
Thread threadPersistCount = new Thread(persistCount);
threadPersistCount.Start();
Thread cleanupLog = new Thread(cleanupOldLog);
cleanupLog.Start();
/* --------------------------------
* Setup Gestione Counters
@@ -410,6 +414,34 @@ void setupConf()
}
}
/// <summary>
/// Esecuzione pulizia cartella log
/// </summary>
void cleanupOldLog()
{
// esecuzione ogni ora +/- 1 min
int minPeriod = 1000 * 60 * 59;
int maxPeriod = 1000 * 60 * 61;
do
{
DateTime limit = DateTime.Now.AddDays(-LogMaxAgeDays);
// cerco file + vecchi di
var file2check = Directory
.EnumerateFiles(LogFolder, "*.log", SearchOption.TopDirectoryOnly)
.Select(file => new FileInfo(file))
.Where(fInfo => fInfo.LastWriteTime < limit && fInfo.Name.Length > 10)
.ToList();
// cerco e se NON si tratta dei 3 file standard --> elimino!
foreach (var item in file2check)
{
Log.Info($"Deleting old logfile: {item.Name}");
item.Delete();
}
// attesa random di circa 1 minuti x calcolare...
Thread.Sleep(rand.Next(minPeriod, maxPeriod));
} while (true);
}
/// <summary>
/// Test di uguaglianza tra 2 dizionari...
/// </summary>
@@ -1046,7 +1078,7 @@ async void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
{
await Task.Run(() =>
{
_= checkCeasedAlarm(item);
_ = checkCeasedAlarm(item);
});
}
// Loggo quanto fatto
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.2.2308.2118</h4>
<h4>Version: 1.2.2404.1519</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.2.2308.2118
1.2.2404.1519
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.2.2308.2118</version>
<version>1.2.2404.1519</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+5 -3
View File
@@ -7,14 +7,14 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
"MP.MONO.Data": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
},
"DbConfig": {
"Server": "10.74.82.230",
"Server": "lb.ufficio",
"nKey": "MONO",
"sKey": "Calcium0xide-CaO"
},
@@ -44,6 +44,8 @@
"DbSampleInt": 60,
"BlinkPeriodMSec": 3000,
"NumDay2Keep": 365,
"LogDurationLimitMs": 1500
"LogDurationLimitMs": 1500,
"LogFolder": "logs",
"LogMaxAgeDays": 15
}
}
+1 -1
View File
@@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
+6 -1
View File
@@ -51,7 +51,12 @@ namespace MP.MONO.Data
if (!optionsBuilder.IsConfigured)
{
var serverVersion = ServerVersion.AutoDetect(connString);
optionsBuilder.UseMySql(connString, serverVersion);
;
optionsBuilder.UseMySql(connString, serverVersion, options => options.EnableRetryOnFailure(
maxRetryCount: 5,
maxRetryDelay: TimeSpan.FromSeconds(10),
errorNumbersToAdd: null)
);
}
}
+5 -1
View File
@@ -163,7 +163,11 @@ namespace MP.MONO.Data
if (!optionsBuilder.IsConfigured)
{
var serverVersion = ServerVersion.AutoDetect(connString);
optionsBuilder.UseMySql(connString, serverVersion);
optionsBuilder.UseMySql(connString, serverVersion, options => options.EnableRetryOnFailure(
maxRetryCount: 5,
maxRetryDelay: TimeSpan.FromSeconds(10),
errorNumbersToAdd: null)
);
}
}
+5 -1
View File
@@ -46,7 +46,11 @@ namespace MP.MONO.Data
if (!optionsBuilder.IsConfigured)
{
var serverVersion = ServerVersion.AutoDetect(connString);
optionsBuilder.UseMySql(connString, serverVersion);
optionsBuilder.UseMySql(connString, serverVersion, options => options.EnableRetryOnFailure(
maxRetryCount: 5,
maxRetryDelay: TimeSpan.FromSeconds(10),
errorNumbersToAdd: null)
);
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.2.2308.2118</Version>
<Version>1.2.2404.1519</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.2.2308.2118</h4>
<h4>Version: 1.2.2404.1519</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.2.2308.2118
1.2.2404.1519
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.2.2308.2118</version>
<version>1.2.2404.1519</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -3
View File
@@ -7,15 +7,14 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=30000,syncTimeout=30000,asyncTimeout=30000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "redis01.ufficio:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=30000,syncTimeout=30000,asyncTimeout=30000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
"MP.MONO.Data": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;"
},
"DbConfig": {
"Server": "10.74.82.230",
//"Server": "localhost",
"Server": "lb.ufficio",
"nKey": "MONO",
"sKey": "M3T@n0-CH4"
},
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.2.2308.2118</Version>
<Version>1.2.2404.1519</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MAPO-MONO</i>
<h4>Version: 1.2.2308.2118</h4>
<h4>Version: 1.2.2404.1519</h4>
<br /> Release Note:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.2.2308.2118
1.2.2404.1519
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.2.2308.2118</version>
<version>1.2.2404.1519</version>
<url>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "localhost:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",
+1 -1
View File
@@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "nkcredis.steamware.net:6379,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Redis": "localhost:26379,serviceName=devel,DefaultDatabase=7,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"AuthConnection": "Server=localhost;port=3306;database=GWMS;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"DefaultConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=GWMS;pwd=GWMS_secret_pwd;sslmode=None;",
"AdminConnection": "Server=localhost;port=3306;database=MAPO.MONO;user=root;pwd=Seriate_24068!;sslmode=None;",