WorkSubsystemOperationTimeCalc более поздние телеметрии теперь анализируются в первую очередь

This commit is contained in:
ngfrolov 2023-11-08 10:27:00 +05:00
parent d130d3ca5e
commit e434daec2e
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
4 changed files with 6 additions and 7 deletions

View File

@ -54,6 +54,7 @@ public class BackgroundWorker : BackgroundService
protected override async Task ExecuteAsync(CancellationToken token)
{
Trace.TraceInformation($"{GetType().Name} started");
while (!token.IsCancellationRequested && works.TryDequeue(out CurrentWork))
{
try

View File

@ -42,6 +42,7 @@ public class PeriodicBackgroundWorker : BackgroundService
protected override async Task ExecuteAsync(CancellationToken token)
{
Trace.TraceInformation($"{GetType().Name} started");
while (!token.IsCancellationRequested)
{
try

View File

@ -55,10 +55,12 @@ public class WorkSubsystemOperationTimeCalc : Work
{
IdTelemetry = outer,
inner.SingleOrDefault()?.LastDate,
});
})
.OrderByDescending(i => i.IdTelemetry);
var count = telemetryLastDetectedDates.Count();
var i = 0d;
foreach (var item in telemetryLastDetectedDates)
{
onProgressCallback($"Start handling telemetry: {item.IdTelemetry} from {item.LastDate}", i++ / count);

View File

@ -1,8 +1,6 @@
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.DetectOperations;
using AsbCloudInfrastructure.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
@ -10,10 +8,7 @@ using System.Threading.Tasks;
using System.Threading;
using AsbCloudInfrastructure.Background;
using AsbCloudApp.Data.SAUB;
using AsbCloudInfrastructure.Services.SAUB;
using AsbCloudInfrastructure.Services.Subsystems;
using System.Linq;
using DocumentFormat.OpenXml.InkML;
using AsbCloudDb;
using AsbCloudApp.Repositories;