TelemetryDataBaseService Add diagnostic message

This commit is contained in:
ngfrolov 2023-09-25 13:20:11 +05:00
parent 9821336045
commit cef609fbdb
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,4 @@
using AsbCloudApp.Data;
using AsbCloudApp.Exceptions;
using AsbCloudApp.Services;
using AsbCloudDb;
using AsbCloudDb.Model;
@ -64,10 +63,8 @@ namespace AsbCloudInfrastructure.Services.SAUB
return entity;
});
var entityMaxDate = entities.Max(e => e.DateTime);
var dbset = db.Set<TEntity>();
var stopwatch = Stopwatch.StartNew();
var dbset = db.Set<TEntity>();
try
{
return await db.Database.ExecInsertOrUpdateAsync(dbset, entities, token).ConfigureAwait(false);

View File

@ -177,6 +177,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
var idTelemetry = well.IdTelemetry!.Value;
var hoursOffset = well.Timezone.Hours;
System.Diagnostics.Trace.TraceInformation($"cache<{typeof(TDto).Name}>: Loading for well: {well.Cluster?.Caption}/{well.Caption} (capacity:{capacity}) idTelemetry:{idTelemetry}");
var cacheItem = await GetOrDefaultCacheDataFromDbAsync<TEntity>(db, idTelemetry, capacity, hoursOffset, token);
if(cacheItem is not null)
{