Tolta gestione pestDataLayer x prevenire evetuali altri errori e blocchi
This commit is contained in:
+6
-51
@@ -185,10 +185,6 @@ namespace IOB_WIN
|
||||
|
||||
loadIniFile(defConfFilePath);
|
||||
lgInfo("INI LOADED");
|
||||
loadPersistLayer(utils.defPersLayerFile);
|
||||
lgInfo("PersLayerFile READ");
|
||||
iobObj.loadPersData();
|
||||
lgInfo("PersLayerFile LOADED");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -381,8 +377,7 @@ namespace IOB_WIN
|
||||
if (iobObj.adpTryRestart && currWait > utils.CRI("waitRecMSec"))
|
||||
{
|
||||
lastStartTry = DateTime.Now;
|
||||
iobObj.tryConnect();
|
||||
iobObj.loadPersData();
|
||||
iobObj.tryConnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,8 +392,7 @@ namespace IOB_WIN
|
||||
if (iobObj.adpTryRestart && currWait > utils.CRI("waitRecMSec"))
|
||||
{
|
||||
lastStartTry = DateTime.Now;
|
||||
avviaAdapter(chkForceDequeue.Checked);
|
||||
iobObj.loadPersData();
|
||||
avviaAdapter(chkForceDequeue.Checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,40 +542,7 @@ namespace IOB_WIN
|
||||
// abbasso semaforo salvataggio
|
||||
iobObj.adpSaving = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Carica da file l'oggetto di persistenza dati
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
public void loadPersistLayer(string filePath)
|
||||
{
|
||||
// inizializzo prima di leggere...
|
||||
iobObj.persistenceLayer = new Dictionary<string, string>();
|
||||
iobObj.persistenceLayer = utils.ReadPlain(filePath);
|
||||
|
||||
// 2017.03.23 check problema files corrotti...
|
||||
if (iobObj.persistenceLayer.Count == 0)
|
||||
{
|
||||
// se avesse letto un valore NON coerente (senza righe) PROVA a leggere a ritroso vecchi files... da histPersLayerFile e precedenti...
|
||||
int numDD = 0;
|
||||
int maxNumDD = utils.CRI("maxNumDD");
|
||||
Dictionary<string, string> lastRead = new Dictionary<string, string>();
|
||||
// continuo fino a che non leggo almeno 1 riga valida e non ho raggiunto maxDD
|
||||
while (numDD < maxNumDD && lastRead.Count == 0)
|
||||
{
|
||||
// leggo il file storico alla data anticipata... (ci provo...)
|
||||
try
|
||||
{
|
||||
lastRead = utils.ReadPlain(utils.prevPersLayerFile(numDD));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
numDD++;
|
||||
}
|
||||
// se sono uscito PROVO a passare il file storico letto buono (oppure vuoto...)
|
||||
iobObj.persistenceLayer = lastRead;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -606,11 +567,7 @@ namespace IOB_WIN
|
||||
{
|
||||
string iniConfFile = openFileDial.FileName;
|
||||
loadIniFile(iniConfFile);
|
||||
lgInfo("INI LOADED");
|
||||
loadPersistLayer(utils.defPersLayerFile);
|
||||
lgInfo("PersLayerFile READ");
|
||||
iobObj.loadPersData();
|
||||
lgInfo("PersLayerFile LOADED");
|
||||
lgInfo("INI LOADED");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,8 +681,7 @@ namespace IOB_WIN
|
||||
/// <param name="e"></param>
|
||||
private void start_Click(object sender, EventArgs e)
|
||||
{
|
||||
avviaAdapter(chkForceDequeue.Checked);
|
||||
iobObj.loadPersData();
|
||||
avviaAdapter(chkForceDequeue.Checked);
|
||||
// salvo che ho avviato adapter
|
||||
lgInfo("Completato LOAD Adapter");
|
||||
}
|
||||
@@ -797,8 +753,7 @@ namespace IOB_WIN
|
||||
loadIniFile(defConfFilePath);
|
||||
displayTaskAndLog("RESTARTING: Ini File Reloaded");
|
||||
// faccio start... CON RESET delel code
|
||||
avviaAdapter(true);
|
||||
iobObj.loadPersData();
|
||||
avviaAdapter(true);
|
||||
displayTaskAndLog("RESTARTING: Adapter Started");
|
||||
// resetto i data monitor...
|
||||
dataMonitor_0 = "";
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<add key="waitEndCycle" value="0"/>
|
||||
<add key="comCheckTOut" value="10"/>
|
||||
<!-- watchdog, ping, check disconnesso -->
|
||||
<add key="nMaxSend" value="5"/>
|
||||
<add key="pingTestSec" value="5"/>
|
||||
<add key="watchdogMaxSec" value="90"/>
|
||||
<add key="disconMaxSec" value="60"/>
|
||||
|
||||
+14
-7
@@ -545,12 +545,6 @@ namespace IOB_WIN
|
||||
lgError("Errore server NON pronto in pzCntReload");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// lettura file di persistenza
|
||||
/// </summary>
|
||||
public void loadPersData()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Avvia l'adapter sulla porta richiesta
|
||||
@@ -1160,7 +1154,20 @@ namespace IOB_WIN
|
||||
/// <summary>
|
||||
/// Valore del num max invii consecutivi da coda...
|
||||
/// </summary>
|
||||
protected int nMaxSend = 10;
|
||||
protected int nMaxSend
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 5;
|
||||
try
|
||||
{
|
||||
answ = utils.CRI("nMaxSend");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DateTime Ultimo valore simulazione generato
|
||||
/// </summary>
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=336']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=337']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.1.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO-IOB-WIN'
|
||||
|
||||
Reference in New Issue
Block a user