forked from ddrilling/AsbCloudServer
TelemetryDataBaseService Add diagnostic message
This commit is contained in:
parent
9821336045
commit
cef609fbdb
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user