forked from ddrilling/AsbCloudServer
Fixed Telemetry analysis start depending on analyze start date
This commit is contained in:
parent
c0918652a3
commit
b60b84b45c
@ -35,7 +35,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
var timeToStartAnalysis = DateTime.Now;
|
||||
|
||||
while (false)//(!token.IsCancellationRequested)
|
||||
while (!token.IsCancellationRequested)
|
||||
{
|
||||
if(DateTime.Now > timeToStartAnalysis)
|
||||
{
|
||||
|
@ -242,6 +242,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
var analyzeStartDate = GetAnalyzeStartDate(idTelemetry);
|
||||
|
||||
if(analyzeStartDate != default)
|
||||
{
|
||||
while (GetDataSaubsToAnalyze(idTelemetry, analyzeStartDate).Any())
|
||||
{
|
||||
var dataSaubsToAnalyze = GetDataSaubsToAnalyze(idTelemetry, analyzeStartDate);
|
||||
@ -283,6 +285,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<DatesRangeDto> GetOperationsDateRangeAsync(int idWell,
|
||||
CancellationToken token = default)
|
||||
@ -334,7 +337,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
ds.Date >= analyzeStartDate
|
||||
select ds).FirstOrDefault();
|
||||
|
||||
var firstSaubUtcTime = firstDataSaub.Date.ToUniversalTime();
|
||||
var firstSaubUtcTime = firstDataSaub?.Date.ToUniversalTime() ?? default;
|
||||
|
||||
return firstSaubUtcTime;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user