Update x log tempo ricalcolo statistiche daily
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ namespace NKC_SDK
|
||||
/// Classe per effettuare comunicazioni con NKC
|
||||
/// </summary>
|
||||
/// <param name="baseIp">IP di base x ping</param>
|
||||
/// <param name="baseUrl">URL di abse x chiamate REST</param>
|
||||
/// <param name="baseUrl">URL di base x chiamate REST</param>
|
||||
/// <param name="codPost">Codice posstazione/macchina x cui si fa chiamata</param>
|
||||
public NKC(string baseIp, string baseUrl, string codPost)
|
||||
{
|
||||
|
||||
+12
-12
@@ -5,24 +5,24 @@
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<appSettings>
|
||||
<!--Base server URL-->
|
||||
<add key="BaseUrl" value="http://sakitting/nkc" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="BaseUrl" value="http://sakitting/nkc2" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--conf redis-->
|
||||
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false,allowAdmin=true" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false,allowAdmin=true" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--Matrix-->
|
||||
<add key="matrixUrl" value="http://sakitting/zcode" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="matrixUrl" value="http://sakitting/zcode" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--MongoDb-->
|
||||
<add key="mdbConnString" value="mongodb://localhost:27017" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="mdbConnString" value="mongodb://localhost:27017" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<!--conn string-->
|
||||
<add key="NKC_WFConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="DbConfConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="VocabolarioConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="PermessiConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="NKC_WFConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="DbConfConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="VocabolarioConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
<add key="PermessiConnectionString" value="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC;" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<add name="AppData.Properties.Settings.Sauder_NKCConnectionString" connectionString="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
<add name="ErrorLog" connectionString="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
<add name="AppData.Properties.Settings.Sauder_NKCConnectionString" connectionString="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
|
||||
<add name="ErrorLog" connectionString="Data Source=SAKITTING\SQLEXPRESS;Initial Catalog=Elmah;Persist Security Info=True;User ID=conn_NKC;Password=pwd_NKC" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -77,7 +78,9 @@ namespace NKC_WF.site
|
||||
// verifica se ci sia VETO x update da redis
|
||||
string rawVal = memLayer.ML.getRSV(ComLib.redVetoDayStats);
|
||||
if (string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
{ // effettuo calcolo statistiche
|
||||
Stopwatch stopWatchLap = new Stopwatch();
|
||||
stopWatchLap.Start();
|
||||
// se non c'è effettua ricalcolo x i giorni necessari (da ultimo ricalcolo oppure da valore web.config)
|
||||
int numDays = memLayer.ML.CRI("repNumDayPre");
|
||||
// verifico ultimo record...
|
||||
@@ -106,6 +109,8 @@ namespace NKC_WF.site
|
||||
DLMan.taDayStats.ProductionUpdate(DateStart, DateEnd, "*", true);
|
||||
int vetoRecalcMin = memLayer.ML.CRI("repVetoRecalcMin");
|
||||
memLayer.ML.setRSV(ComLib.redVetoDayStats, $"Recalc Done | {DateStart} --> {DateEnd}", 60 * vetoRecalcMin);
|
||||
stopWatchLap.Stop();
|
||||
lgInfo($"DayStats DB ProductionUpdate: effettuato ricalcolo statistiche | periodo {DateStart} --> {DateEnd} | elapsed: {stopWatchLap.Elapsed.TotalMilliseconds} ms | veto ricalcolo per {vetoRecalcMin} minuti");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user