Spostamento aree protected da Generic a BaseObj
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using IOB_UT_NEXT;
|
||||
using IOB_UT_NEXT.Objects;
|
||||
using IOB_UT_NEXT.Services.Data;
|
||||
using IOB_UT_NEXT.Objects;
|
||||
using NLog;
|
||||
using System;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
{
|
||||
// jitter di avvio per disallineare le istanze nella VM
|
||||
Random startRnd = new Random();
|
||||
int startDelay = startRnd.Next(0, 5000);
|
||||
int startDelay = startRnd.Next(0, 200);
|
||||
Thread.Sleep(startDelay);
|
||||
|
||||
// gestione invio ritardato contapezzi
|
||||
@@ -149,30 +149,9 @@ namespace IOB_WIN_FORM.Iob
|
||||
// simulazione processo FTP (Cimolai) - FIXME TODO DeleteME
|
||||
ProcessDataSync();
|
||||
}
|
||||
// carica conf
|
||||
try
|
||||
{
|
||||
// Invece di bloccare il costruttore con .GetAwaiter().GetResult(),
|
||||
// avviamo il carico in modo "fire-and-forget" controllato.
|
||||
// Questo evita il context switch pesante durante l'inizializzazione.
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
await Simula_Load(adesso);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lgError($"Errore in Simula_Load (background): {ex.Message}");
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lgError($"Errore nel lancio del task Simula_Load: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
@@ -516,8 +495,8 @@ namespace IOB_WIN_FORM.Iob
|
||||
public override async Task InitializeAsync()
|
||||
{
|
||||
await Simula_Load(DateTime.Now);
|
||||
// attendo altri 50ms
|
||||
await Task.Delay(50);
|
||||
// attendo altri 10ms
|
||||
await Task.Delay(10);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user