Merge tag 'ReloadAppConfFix' into develop

Riprostinato metodo init appConf
This commit is contained in:
Samuele Locatelli
2021-08-11 15:27:23 +02:00
2 changed files with 7 additions and 23 deletions
+3 -11
View File
@@ -1950,16 +1950,8 @@ namespace SteamWare.IO
/// </summary>
public void resetAppConf()
{
// controlo chiave x evitare doppio reset
if (!string.IsNullOrEmpty(getRSV(CleaningKey)))
{
//imposto veto 10 sec
setRSV(CleaningKey, DateTime.Now.ToString(), 10);
redDelKey(ACBH);
startupAppConf();
// veto 1 sec --> se ne va subito
setRSV(CleaningKey, "", 1);
}
redDelKey(ACBH);
startupAppConf();
}
/// <summary>
@@ -2171,7 +2163,7 @@ namespace SteamWare.IO
/// <param name="valore"></param>
/// <param name="TTL_sec">in secondi</param>
/// <returns></returns>
public bool setRSV(string chiave, string valore, int TTL_sec)
public bool setRSV(string chiave, string valore, int TTL_sec = 5)
{
bool answ = false;
try
+4 -12
View File
@@ -1967,16 +1967,8 @@ namespace SteamWare
/// </summary>
public void resetAppConf()
{
// controlo chiave x evitare doppio reset
if (!string.IsNullOrEmpty(getRSV(CleaningKey)))
{
//imposto veto 10 sec
setRSV(CleaningKey, DateTime.Now.ToString(), 10);
redDelKey(ACBH);
startupAppConf();
// veto 1 sec --> se ne va subito
setRSV(CleaningKey, "", 1);
}
redDelKey(ACBH);
startupAppConf();
}
/// <summary>
@@ -2176,7 +2168,7 @@ namespace SteamWare
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
logger.lg.scriviLog(string.Format($"Errore in setRSV | chiave: {chiave} | valore: {valore}{Environment.NewLine}{exc}"), tipoLog.EXCEPTION);
}
return answ;
}
@@ -2200,7 +2192,7 @@ namespace SteamWare
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Errore in setRSV:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
logger.lg.scriviLog(string.Format($"Errore in setRSV | chiave: {chiave} | valore: {valore} | TTL: {TTL_sec}{Environment.NewLine}{exc}"), tipoLog.EXCEPTION);
}
return answ;
}