Update x testing deploy dati Lovato

This commit is contained in:
Samuele Locatelli
2024-05-31 16:56:02 +02:00
parent 53972d0480
commit fd9fa52d36
7 changed files with 57 additions and 48 deletions
-1
View File
@@ -104,7 +104,6 @@ variables:
Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd;
echo "replace completati"
stages:
- build
- staging
+5 -2
View File
@@ -25,8 +25,11 @@ namespace EgwProxy.DataLayer
public static string ADMIN_CONNECTION_STRING { get; set; } = "";
/// <summary>
/// DB Connection string, per effettuare migration riportare valore connessione admin cablato (server=localhost;port=3306;database=EgtBwDb_000102;uid=root;pwd=Egalware_24068!;)
/// DB Connection string, per effettuare migration riportare valore connessione admin cablato
/// DB Manu: server=localhost;port=3306;database=EgtBwDb_000102;uid=root;pwd=Egalware_24068!;
/// DB Sam: server=localhost;port=3306;database=EgtBwDb_000470;uid=root;pwd=Egalware_24068!;
/// DB Lovato: server=localhost;port=3306;database=EgtBwDb_000656;uid=root;pwd=Egalware_24068!;
/// </summary>
public static string CONNECTION_STRING { get; set; } = "server=localhost;port=3306;database=EgtBwDb_000470;uid=root;pwd=Egalware_24068!";
public static string CONNECTION_STRING { get; set; } = "server=localhost;port=3306;database=EgtBwDb_000656;uid=root;pwd=Egalware_24068!";
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>1.0.2405.0717</Version>
<Version>1.0.2405.2316</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>MagMan - Wood Warehouse Management System</i>
<h4>Versione: 1.0.2405.0717</h4>
<h4>Versione: 1.0.2405.2316</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.0.2405.0717
1.0.2405.2316
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.2405.0717</version>
<version>1.0.2405.2316</version>
<url>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/MagMan.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/MagMan/stable/0/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+48 -41
View File
@@ -15,7 +15,10 @@ namespace DemoApp
static async Task Main(string[] args)
{
bool execTop = false;
// indica se eseguire step check syncro remota dati via REST
bool testSync = false;
// indica se eseguire step check syncro dati LOG da DB a REST remoti
bool testDbLog = true;
// num chiave
int keyNum = 470;
@@ -23,8 +26,9 @@ namespace DemoApp
// Indirizzo server (DEBUG)
string servAddr = "localhost:7207";
// token di auth
string commToken = "91f4fec6-7e9c-4130-9df2-702d729ccdd3";
// token di auth nostro
//string commToken = "e7a81d7a-6fb4-412e-b361-cac7dda517d6";
string commToken = "79840ba7-00c1-407f-8372-5b60238c04fa";
#else
// Indirizzo server (RELEASE)
string servAddr = "magman.egalware.com";
@@ -47,7 +51,7 @@ namespace DemoApp
string esito = servOk ? "OK" : "KO";
Console.WriteLine($"Esito controllo server: {esito}");
// se richiesto eseguo tutto sennò salto
if (execTop)
if (testSync)
{
Console.WriteLine("Premere un tasto per lettura archivio materiali");
@@ -198,47 +202,50 @@ namespace DemoApp
var resAliasSend = commLib.AliasSend(alias2send);
}
// carico dal DB primi 50 rec e li invio 10 alla volta...
LogMachineController lmc = new LogMachineController();
int num2send = 2000;
int batchSize = 100;
int numSent = 0;
MagmanController mContr = new MagmanController(servAddr, commToken);
// sistemo proj x sync online
var syncRes = mContr.ProjAllSyncro();
// sistemo dati mancanti...
lmc.TryFixProjCloudId();
var recList = lmc.GetUnsentAsc(num2send);
// ciclo!
while (numSent < num2send)
if (testDbLog)
{
var currList = recList
.Skip(numSent)
.Take(batchSize)
.ToList();
// converto il blocco
var listDto = currList
.Select(x => LogMachineController.ConvToItemDto(x))
.ToList();
// invio!
var res = await commLib.LogMachineSendAsync(listDto);
if (res)
// carico dal DB primi 2000 rec e li invio 100 alla volta...
LogMachineController lmc = new LogMachineController();
int num2send = 2000;
int batchSize = 100;
int numSent = 0;
MagmanController mContr = new MagmanController(servAddr, commToken);
// sistemo proj x sync online
var syncRes = mContr.ProjAllSyncro();
// sistemo dati mancanti...
lmc.TryFixProjCloudId();
var recList = lmc.GetUnsentAsc(num2send);
// ciclo!
while (numSent < num2send)
{
// registro dati inviati...
lmc.SetDtSent(currList);
Console.WriteLine($"Inviati {batchSize}rec | {numSent} --> {numSent + batchSize}");
numSent += batchSize;
}
else
{
Console.WriteLine($"Errore in invio logMacchina");
var currList = recList
.Skip(numSent)
.Take(batchSize)
.ToList();
// converto il blocco
var listDto = currList
.Select(x => LogMachineController.ConvToItemDto(x))
.ToList();
// invio!
var res = await commLib.LogMachineSendAsync(listDto);
if (res)
{
// registro dati inviati...
lmc.SetDtSent(currList);
Console.WriteLine($"Inviati {batchSize}rec | {numSent} --> {numSent + batchSize}");
numSent += batchSize;
}
else
{
Console.WriteLine($"Errore in invio logMacchina");
}
}
Console.WriteLine(sep);
Console.WriteLine();
}
Console.WriteLine(sep);
Console.WriteLine();
Console.WriteLine("Enter to close");
answ = Console.ReadLine();