aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-11 20:57:30 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-12-11 20:57:30 +0200
commit621230afe9d9040536b43241e63117c9bb34beaa (patch)
treec9f3a3793372a1be6a7e73cdf633e2dae40c21c9 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
parent3f069bb4a5303b2c732ba1263229f62526acc693 (diff)
downloadTango-621230afe9d9040536b43241e63117c9bb34beaa.tar.gz
Tango-621230afe9d9040536b43241e63117c9bb34beaa.zip
Implemented Jobs, JobRuns & Machine Events Synchronization.
Added synchronizations to Updates view on Machine Designer. Removed request response events logging from machine studio. Fixed issue with exception throwing from machine service. Implemented "New jobs synchronized" notification item to PPC. Added synchronization to PPC settings. Added Synchronization view to technician module. Implemented PPC Schema synchronizer utility. Added custom query support to EntityCollectionBuilder. Added synchronization status to TangoUpdate. Removed FK from Jobs and Job runs.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
index f1c722d96..dfa9b833b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs
@@ -44,6 +44,7 @@ namespace Tango.PPC.Common.MachineSetup
private IOperationSystemManager _windows_manager;
private PPCWebClient _client;
private List<LogItemBase> _logs;
+ private bool _isUpdating;
#region Events
@@ -93,7 +94,10 @@ namespace Tango.PPC.Common.MachineSetup
private void LogManager_NewLog(object sender, LogItemBase e)
{
- _logs.Add(e);
+ if (_isUpdating)
+ {
+ _logs.Add(e);
+ }
}
#endregion
@@ -136,6 +140,8 @@ namespace Tango.PPC.Common.MachineSetup
LogManager.Log(xx, "Error notifying setup completed.");
}
}
+
+ _isUpdating = false;
}
private async void OnCompleted(MachineSetupResult result, TaskCompletionSource<MachineSetupResult> completionSource, MachineSetupResponse response)
@@ -157,6 +163,8 @@ namespace Tango.PPC.Common.MachineSetup
LogManager.Log(xx, "Error notifying setup completed.");
}
}
+
+ _isUpdating = false;
}
private String GetLogsStringAndClear()
@@ -186,6 +194,8 @@ namespace Tango.PPC.Common.MachineSetup
try
{
+ _isUpdating = true;
+
LogManager.Log($"Starting machine setup for serial number {serialNumber}...");
var machineServiceAddress = SettingsManager.Default.GetOrCreate<PPCSettings>().GetMachineServiceAddress();