Fix verifica lunghezza carattere dtEvent + aggiunto log al nCall2Log x chiamate IOB
This commit is contained in:
+41
-2
@@ -399,7 +399,23 @@ namespace MapoDb
|
||||
/// <returns></returns>
|
||||
public static string processInput(string idxMacchina, string valore, string dtEve, string dtCurr, string contatore)
|
||||
{
|
||||
|
||||
// 2017.09.14 trimmo eventualmente lo zero finale dalle date SE supera i millisecondi...
|
||||
dtEve = dtEve.Length > 17 ? dtEve.Substring(0, 17) : dtEve;
|
||||
dtCurr = dtCurr.Length > 17 ? dtCurr.Substring(0, 17) : dtCurr;
|
||||
if (memLayer.ML.CRB("IOB_RedEnab"))
|
||||
{
|
||||
// conto la richiesta nel contatore REDIS
|
||||
long nCall = memLayer.ML.setRCntI("processInput");
|
||||
//... se == nCall2Log scrivo su log e resetto
|
||||
long nCall2Log = memLayer.ML.cdvi("nCall2Log");
|
||||
if (nCall >= nCall2Log)
|
||||
{
|
||||
// loggo
|
||||
logger.lg.scriviLog(string.Format("processInput: effettuate {0} call", nCall), tipoLog.INFO);
|
||||
// resetto!
|
||||
memLayer.ML.resetRCnt("processInput");
|
||||
}
|
||||
}
|
||||
string answ = "";
|
||||
DateTime dataOraEvento = DateTime.Now;
|
||||
DateTime dtEvento, dtCorrente;
|
||||
@@ -433,7 +449,7 @@ namespace MapoDb
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore calcolo ms evento/ora corrente da device remoto:{0}dtEve: {1}{0}dtCurr: {2}{0}{3}", Environment.NewLine, dtEve, dtCurr, exc), tipoLog.EXCEPTION);
|
||||
logger.lg.scriviLog(string.Format("Errore calcolo ms evento/ora corrente da device remoto:{0}dtEve : {1}{0}dtCurr: {2}{0}{3}", Environment.NewLine, dtEve, dtCurr, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -650,6 +666,17 @@ namespace MapoDb
|
||||
bool answ = false;
|
||||
if (memLayer.ML.CRB("IOB_RedEnab"))
|
||||
{
|
||||
// conto la richiesta nel contatore REDIS
|
||||
long nCall = memLayer.ML.setRCntI("insEnabled");
|
||||
//... se == nCall2Log scrivo su log e resetto
|
||||
long nCall2Log = memLayer.ML.cdvi("nCall2Log");
|
||||
if (nCall >= nCall2Log)
|
||||
{
|
||||
// loggo
|
||||
logger.lg.scriviLog(string.Format("insEnabled: effettuate {0} call", nCall), tipoLog.INFO);
|
||||
// resetto!
|
||||
memLayer.ML.resetRCnt("insEnabled");
|
||||
}
|
||||
try
|
||||
{
|
||||
answ = Convert.ToBoolean(mDatiMacchinaVal(idxMacchina, "insEnabled"));
|
||||
@@ -684,6 +711,18 @@ namespace MapoDb
|
||||
bool answ = false;
|
||||
if (memLayer.ML.CRB("IOB_RedEnab"))
|
||||
{
|
||||
|
||||
// conto la richiesta nel contatore REDIS
|
||||
long nCall = memLayer.ML.setRCntI("sLogEnabled");
|
||||
//... se == nCall2Log scrivo su log e resetto
|
||||
long nCall2Log = memLayer.ML.cdvi("nCall2Log");
|
||||
if (nCall >= nCall2Log)
|
||||
{
|
||||
// loggo
|
||||
logger.lg.scriviLog(string.Format("sLogEnabled: effettuate {0} call", nCall), tipoLog.INFO);
|
||||
// resetto!
|
||||
memLayer.ML.resetRCnt("sLogEnabled");
|
||||
}
|
||||
try
|
||||
{
|
||||
answ = Convert.ToBoolean(mDatiMacchinaVal(idxMacchina, "sLogEnabled"));
|
||||
|
||||
Reference in New Issue
Block a user