From 42cf4c2f7310b3f733a27f9046b0688d45e7e57b Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 6 Dec 2022 09:45:53 -0700 Subject: [PATCH] v2.47.1 - ISQ query in OI file name when PSN and Reactor is present --- Adaptation/FileHandlers/OpenInsight/FileRead.cs | 12 +++++++----- Adaptation/FileHandlers/OpenInsight/FromIQS.cs | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index 9fa6681..33711e3 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -112,9 +112,7 @@ public class FileRead : Shared.FileRead, IFileRead internal static string GetLines(Logistics logistics, List descriptions) { - StringBuilder result = new("-"); - if (logistics is null) - { } + StringBuilder result = new(logistics.MesEntity); if (descriptions is null) { } return result.ToString(); @@ -137,13 +135,17 @@ public class FileRead : Shared.FileRead, IFileRead string lines = GetLines(_Logistics, descriptions); if (!string.IsNullOrEmpty(lines)) { + long? subGroupId; long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; - (long? subGroupId, string _) = FromIQS.GetCommandText(_BreakAfterSeconds, _IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait); + if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN) || string.IsNullOrEmpty(descriptions[0].RDS)) + subGroupId = null; + else + (subGroupId, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait); if (subGroupId is null) collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines)); else - collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value}_{_OpenInsightFilePattern}"), lines)); + collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines)); } } if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs index 8c6f0a8..a16d396 100644 --- a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -67,7 +67,7 @@ public class FromIQS return stringBuilder; } - internal static (long?, string) GetCommandText(long breakAfterSeconds, string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait) + internal static (long?, string) GetCommandText(string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait) { string dateTime; string commandText; @@ -93,7 +93,8 @@ public class FromIQS if (stringBuilder.Length > 0) break; if (DateTime.Now.Ticks > breakAfter) - throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!"); + // throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!"); + break; Thread.Sleep(250); } if (stringBuilder.Length == 0)