aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
commit161fe6f6d2b29ba3deb641cdc049ad0d8f58004e (patch)
tree20318bb7ea4a243b8c2e9757e4635e8d5f5cb728 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate
parent30fcfa4100a9d00e887c6e17e32e427b05296ce7 (diff)
parentb674a2e7751daa80c0d74207968bf8e3d18d7faf (diff)
downloadTango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.tar.gz
Tango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
index 3061b9506..64123acca 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs
@@ -11,6 +11,7 @@ using System.Threading;
using System.Threading.Tasks;
using Tango.Core;
using Tango.Core.DB;
+using Tango.Core.ExtensionMethods;
using Tango.Core.Helpers;
using Tango.Core.IO;
using Tango.Integration.Operation;
@@ -358,7 +359,7 @@ namespace Tango.PPC.Common.MachineUpdate
ExaminerSequenceConfiguration config_sequence = ExaminerSequenceConfiguration.FromFile(config_file);
- foreach (var item in config_sequence.Items.Where(x => x.Type == ExaminerSequenceItemType.Data).OrderBy(x => x.Index))
+ foreach (var item in config_sequence.Items.Where(x => x.Type == ExaminerSequenceItemType.Data || update_response.PerformSchemaUpdate).OrderBy(x => x.Index))
{
LogManager.Log($"Executing update script '{item.FileName}...'");
@@ -375,7 +376,7 @@ namespace Tango.PPC.Common.MachineUpdate
var config = builder.Build();
- ExaminerProcess process = new ExaminerProcess(config, ExaminerProcessType.Data);
+ ExaminerProcess process = new ExaminerProcess(config, item.Type == ExaminerSequenceItemType.Data ? ExaminerProcessType.Data : ExaminerProcessType.Schema);
process.Progress += (x, msg) =>
{
LogManager.Log(msg);
@@ -389,7 +390,7 @@ namespace Tango.PPC.Common.MachineUpdate
if (result.ExitCode != ExaminerProcessExitCode.Success)
{
- throw LogManager.Log(new InvalidDataException(String.Format("OverrideData script has terminated with exit code '{0}'.", result.ExitCode)));
+ throw LogManager.Log(new InvalidDataException($"{item.FileName} script has terminated with exit code '{result.ExitCode}'."));
}
LogManager.Log("Script executed successfully.");