v2.47.1 - ISQ query in OI file name when
PSN and Reactor is present
This commit is contained in:
parent
b2fd2a7600
commit
42cf4c2f73
@ -112,9 +112,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
|
|
||||||
internal static string GetLines(Logistics logistics, List<txt.Description> descriptions)
|
internal static string GetLines(Logistics logistics, List<txt.Description> descriptions)
|
||||||
{
|
{
|
||||||
StringBuilder result = new("-");
|
StringBuilder result = new(logistics.MesEntity);
|
||||||
if (logistics is null)
|
|
||||||
{ }
|
|
||||||
if (descriptions is null)
|
if (descriptions is null)
|
||||||
{ }
|
{ }
|
||||||
return result.ToString();
|
return result.ToString();
|
||||||
@ -137,13 +135,17 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
string lines = GetLines(_Logistics, descriptions);
|
string lines = GetLines(_Logistics, descriptions);
|
||||||
if (!string.IsNullOrEmpty(lines))
|
if (!string.IsNullOrEmpty(lines))
|
||||||
{
|
{
|
||||||
|
long? subGroupId;
|
||||||
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
||||||
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).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)
|
if (subGroupId is null)
|
||||||
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
|
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
|
||||||
else
|
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)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
@ -67,7 +67,7 @@ public class FromIQS
|
|||||||
return stringBuilder;
|
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 dateTime;
|
||||||
string commandText;
|
string commandText;
|
||||||
@ -93,7 +93,8 @@ public class FromIQS
|
|||||||
if (stringBuilder.Length > 0)
|
if (stringBuilder.Length > 0)
|
||||||
break;
|
break;
|
||||||
if (DateTime.Now.Ticks > breakAfter)
|
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);
|
Thread.Sleep(250);
|
||||||
}
|
}
|
||||||
if (stringBuilder.Length == 0)
|
if (stringBuilder.Length == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user