forked from ddrilling/AsbCloudServer
Правки по ревью
This commit is contained in:
parent
1aeb9599d1
commit
cbfce9eefc
@ -15,7 +15,10 @@ namespace AsbCloudApp.Services
|
||||
/// <summary>
|
||||
/// Создание записей таблицы DataSaubStat
|
||||
/// </summary>
|
||||
/// <param name="gap">Временной интервал, за который будет рассчитываться статистика DataSaubStat</param>
|
||||
/// <param name="gap">
|
||||
/// Количество дней, которые необходимо вычесть из текущей даты для формирования начальной даты
|
||||
/// сбора данных по телеметрии
|
||||
/// </param>
|
||||
/// <param name="onProgressCallback"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
|
@ -29,7 +29,7 @@ namespace AsbCloudInfrastructure.Background.PeriodicWorks
|
||||
|
||||
protected override async Task Action(string id, IServiceProvider services, Action<string, double?> onProgressCallback, CancellationToken token)
|
||||
{
|
||||
var dataSaubStatService = services.GetService<IDataSaubStatService>();
|
||||
var dataSaubStatService = services.GetRequiredService<IDataSaubStatService>();
|
||||
|
||||
if (dataSaubStatService != null )
|
||||
await dataSaubStatService.CreateStatAsync(Gap, onProgressCallback, token);
|
||||
|
@ -52,7 +52,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
var lastDate = stats.FirstOrDefault(s => s.IdTelemetry == idTelemetry)?.DateEnd.ToUniversalTime() ?? DateTimeOffset.UnixEpoch;
|
||||
var statsCount = await CreateStatForTelemetryFromDate(idTelemetry, lastDate, token);
|
||||
if(onProgressCallback != null)
|
||||
onProgressCallback($"Calculate stat for telemetry: {idTelemetry}; from {lastDate}; results count: {statsCount};", 100 * i / idTelemetries.Length);
|
||||
onProgressCallback($"Calculate stat for telemetry: {idTelemetry}; from {lastDate}; results count: {statsCount};", i * 1d / idTelemetries.Length);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user