CORREZIONE BUG! non usava correttamente "lastKA",x cui dopo primo ciclo scriveva SEMPRE!!!
This commit is contained in:
@@ -100,7 +100,7 @@ namespace MP_IO.Controllers
|
||||
{
|
||||
// verifico se sia abilitato SignalLog x una data macchina
|
||||
MapoDb.MapoDb.obj.scriviKeepAlive(idx.ToString(), DateTime.Now);
|
||||
answ = "OK";
|
||||
answ = MapoDb.MapoDb.obj.taKeepAlive.getByIdxMacchina(idx.ToString())[0].DataOraServer.ToString();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<appSettings>
|
||||
<add key="resetConnKA" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="forceResetKeepAlive" value="true" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="kaMinUpdSec" value="120" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="kaMinUpdSec" value="45" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="_logLevel" value="5" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="EnableCdnJQ" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="MoonProConnectionString" value="Data Source=localhost\sqlexpress;Initial Catalog=Donati_MoonPro;Persist Security Info=True;User ID=steamware;Password=viadante16" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
|
||||
+1
-2
@@ -10,8 +10,7 @@
|
||||
<!--keep alive!-->
|
||||
<add key="resetConnKA" value="false"/>
|
||||
<add key="forceResetKeepAlive" value="true"/>
|
||||
<!--<add key="kaMinUpdSec" value="90"/>-->
|
||||
<add key="kaMinUpdSec" value="3"/>
|
||||
<add key="kaMinUpdSec" value="5"/>
|
||||
<!--conf base-->
|
||||
<add key="appName" value="MP-IO"/>
|
||||
<!-- Logging -->
|
||||
|
||||
+2
-1
@@ -1136,10 +1136,10 @@ namespace MapoDb
|
||||
bool doWrite = false;
|
||||
string nomeVar = string.Format("KA{0}", IdxMacchina);
|
||||
// in primis controllo se in cache c'è oggetto keep alive x macchina... formato KA{ID-MACCHINA}
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (memLayer.ML.isInCacheObject(nomeVar))
|
||||
{
|
||||
// leggo data ora, se è + vecchia di corrente - kaMinUpdSec segno da aggiornare
|
||||
DateTime adesso = DateTime.Now;
|
||||
DateTime lastKA = DateTime.Now;
|
||||
try
|
||||
{
|
||||
@@ -1161,6 +1161,7 @@ namespace MapoDb
|
||||
}
|
||||
if (doWrite)
|
||||
{
|
||||
memLayer.ML.setCacheVal(nomeVar, adesso);
|
||||
try
|
||||
{
|
||||
if (memLayer.ML.CRB("resetConnKA"))
|
||||
|
||||
Reference in New Issue
Block a user