Fix gestione timer statico x update
This commit is contained in:
@@ -47,7 +47,7 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static System.Timers.Timer aTimer = null!;
|
||||
private System.Timers.Timer aTimer = null!;
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private Version version = null!;
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
aTimer.Elapsed -= ElapsedTimer;
|
||||
aTimer.Stop();
|
||||
aTimer.Close();
|
||||
aTimer.Dispose();
|
||||
currRecord = null;
|
||||
SearchRecords = null;
|
||||
@@ -97,7 +98,7 @@ namespace MP.SPEC.Components
|
||||
dataTo = (DateTime)SelDtMax;
|
||||
}
|
||||
|
||||
SearchRecords = await MDService.FluxLogGetLastFilt(dataTo, dataFrom, SelMacchina, SelFlux, MaxRecord, RefreshPeriod / 1000);
|
||||
SearchRecords = await MDService.FluxLogGetLastFilt(dataTo, dataFrom, SelMacchina, SelFlux, MaxRecord, RefreshPeriod / 1000 * 1.1);
|
||||
totalCount = SearchRecords.Count;
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
await Task.Delay(1);
|
||||
@@ -179,7 +180,6 @@ namespace MP.SPEC.Components
|
||||
SelDtMax = selRec.dtEvento;
|
||||
// imposto pag 1 filtro
|
||||
SelFilter.CurrPage = 1;
|
||||
//selDtMin = RoundDatetime(5).AddHours(-25);
|
||||
await reloadData(false);
|
||||
await RecordSel.InvokeAsync(selRec);
|
||||
await PagerResetReq.InvokeAsync(true);
|
||||
@@ -195,7 +195,7 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static System.Timers.Timer aTimer = null!;
|
||||
private System.Timers.Timer aTimer = null!;
|
||||
|
||||
private int _totalCount = 0;
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static System.Timers.Timer aTimer = new System.Timers.Timer();
|
||||
private System.Timers.Timer aTimer = new System.Timers.Timer();
|
||||
private List<string>? ListFlux = null;
|
||||
private List<string>? ListMacchine = null;
|
||||
private int numOreAnticipoSnapshot { get; set; } = 50;
|
||||
|
||||
@@ -619,7 +619,7 @@ namespace MP.SPEC.Data
|
||||
}
|
||||
if (canCacheParametri != "false")
|
||||
{
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec / 2));
|
||||
redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec));
|
||||
}
|
||||
}
|
||||
if (result == null)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
public bool LiveUpdate { get; set; } = true;
|
||||
public int MaxRecord { get; set; } = 100;
|
||||
public int NumRec { get; set; } = 10;
|
||||
public int TempoAgg { get; set; } = 10000;
|
||||
public int TempoAgg { get; set; } = 2000;
|
||||
public int TotCount { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -4,8 +4,17 @@ using MP.SPEC.Data;
|
||||
|
||||
namespace MP.SPEC.Pages
|
||||
{
|
||||
public partial class PARAMS
|
||||
public partial class PARAMS : IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected int CurrCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user