configurato MP-IO per fare MENO in gestione keep alive (chiude/riapre connessione...)

This commit is contained in:
Samuele E. Locatelli
2017-05-23 16:44:54 +02:00
parent 1240bd498e
commit 424fe6ae06
2 changed files with 12 additions and 9 deletions
+2 -2
View File
@@ -8,15 +8,15 @@
<!--gestione timeout "esteso" x chiamate SQL critiche, in secondi -->
<add key="sqlLongCommandTimeout" value="600"/>
<!--keep alive!-->
<add key="resetConnKA" value="false"/>
<add key="forceResetKeepAlive" value="true"/>
<add key="kaMinUpdSec" value="45"/>
<!--conf base-->
<add key="appName" value="MP-IO"/>
<!-- Logging -->
<add key="_logDir" value="~/logs/"/>
<add key="_logLevel" value="7"/>
<add key="_logMaxMb" value="30"/>
<!--KeepAlive settings-->
<add key="kaMinUpdSec" value="45"/>
<!--stringhe connessione-->
<add key="MoonProConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
+10 -7
View File
@@ -1163,17 +1163,20 @@ namespace MapoDb
{
try
{
if (memLayer.ML.confReadBool("forceResetKeepAlive"))
if (memLayer.ML.CRB("resetConnKA"))
{
taKeepAlive.Connection.Close();
taKeepAlive.Connection.Open();
}
else
{
if (taKeepAlive.Connection.State == ConnectionState.Closed)
if (memLayer.ML.CRB("forceResetKeepAlive"))
{
taKeepAlive.Connection.Close();
taKeepAlive.Connection.Open();
}
else
{
if (taKeepAlive.Connection.State == ConnectionState.Closed)
{
taKeepAlive.Connection.Open();
}
}
}
taKeepAlive.UpdateQueryNoStartTime(DateTime.Now, oraMacchina, IdxMacchina);
}