Artifactory
Switching to nginx download Bug fix - GetHeaderId
This commit is contained in:
@ -113,13 +113,14 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
#nullable enable
|
||||
|
||||
private string? GetHeaderIdDirectory(DateTime[] dateTimes, long headerId)
|
||||
private string? GetHeaderIdDirectory(long headerId)
|
||||
{
|
||||
string? result = null;
|
||||
int weekNum;
|
||||
string year;
|
||||
string weekDirectory;
|
||||
string checkDirectory;
|
||||
DateTime[] dateTimes = new DateTime[] { _Logistics.DateTimeFromSequence, _Logistics.DateTimeFromSequence.AddDays(-6.66) };
|
||||
foreach (DateTime dateTime in dateTimes)
|
||||
{
|
||||
year = dateTime.Year.ToString();
|
||||
@ -136,7 +137,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return result;
|
||||
}
|
||||
|
||||
private void PostOpenInsightMetrologyViewerAttachments(DateTime dateTime, List<Stratus.Description> descriptions)
|
||||
private void PostOpenInsightMetrologyViewerAttachments(List<Stratus.Description> descriptions)
|
||||
{
|
||||
string? json;
|
||||
string? subGroupId;
|
||||
@ -156,16 +157,17 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
lock (_StaticRuns)
|
||||
_ = _StaticRuns.Remove(_Logistics.Sequence);
|
||||
}
|
||||
DateTime[] dateTimes = new DateTime[] { dateTime, dateTime.AddDays(-6.66) };
|
||||
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||
long headerId = OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, weekOfYear, json, descriptions);
|
||||
string? headerIdDirectory = GetHeaderIdDirectory(dateTimes, headerId);
|
||||
int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
|
||||
long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, json, descriptions);
|
||||
string? headerIdDirectory = GetHeaderIdDirectory(headerId);
|
||||
if (string.IsNullOrEmpty(headerIdDirectory))
|
||||
throw new Exception($"Didn't find header id directory <{headerId}>");
|
||||
OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OriginalDataBioRad, descriptions, matchDirectories[0], subGroupId, headerId, headerIdDirectory);
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
@ -175,7 +177,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
PostOpenInsightMetrologyViewerAttachments(dateTime, descriptions);
|
||||
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
Reference in New Issue
Block a user