Duplicator and now deleting if not sending to EDA
This commit is contained in:
@ -7,7 +7,7 @@ using System.Text.Json;
|
||||
|
||||
namespace Adaptation.FileHandlers.jpeg;
|
||||
|
||||
public class Description : IDescription
|
||||
public class Description : IDescription, Shared.Properties.IDescription
|
||||
{
|
||||
|
||||
public int Test { get; set; }
|
||||
|
@ -173,7 +173,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_Logistics.ProcessJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
if (processData.Text != _LastText || _LastChange < DateTime.Now.AddMinutes(-30).Ticks)
|
||||
if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks)
|
||||
File.Delete(reportFullPath);
|
||||
else
|
||||
{
|
||||
if (processData.Text != _LastText)
|
||||
{
|
||||
@ -185,7 +187,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
double deviation = standardDeviation * 3;
|
||||
double upper = average + deviation;
|
||||
double lower = average - deviation;
|
||||
string message = $"average:{average};sum:{sum};standardDeviation:{standardDeviation};upper:{upper};lower:{lower};TotalDelta:{processData.TotalDelta};Text:{processData.Text};_PreviousTotalDeltaCollection.Count:{_PreviousTotalDeltaCollection.Count};";
|
||||
var dynamic = new { average, sum, standardDeviation, upper, lower, processData.TotalDelta, processData.Text, _PreviousTotalDeltaCollection.Count };
|
||||
string message = JsonSerializer.Serialize(dynamic, new JsonSerializerOptions { WriteIndented = true });
|
||||
_Log.Debug(message);
|
||||
if (processData.TotalDelta > upper || processData.TotalDelta < lower)
|
||||
_SMTP.SendHighPriorityEmailMessage($"Exception:{_CellInstanceConnectionName}", message);
|
||||
|
Reference in New Issue
Block a user