forked from ddrilling/AsbCloudServer
Merge branch 'dev' into fix/trajectory
This commit is contained in:
commit
cdf9ac80ea
@ -157,9 +157,12 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
throw new Exception("Multiple cache loading detected.");
|
||||
|
||||
isLoading = true;
|
||||
Well[] wells = Array.Empty<Well>();
|
||||
|
||||
wells = await db.Set<Well>()
|
||||
var defaultTimeout = db.Database.GetCommandTimeout();
|
||||
System.Diagnostics.Trace.TraceInformation($"cache loading starting. Setting CommandTimeout 90s ({defaultTimeout})");
|
||||
db.Database.SetCommandTimeout(TimeSpan.FromSeconds(90));
|
||||
|
||||
Well[] wells = await db.Set<Well>()
|
||||
.Include(well => well.Telemetry)
|
||||
.Include(well => well.Cluster)
|
||||
.Where(well => well.IdTelemetry != null)
|
||||
@ -188,6 +191,7 @@ namespace AsbCloudInfrastructure.Services.SAUB
|
||||
|
||||
System.Diagnostics.Trace.TraceInformation($"cache<{typeof(TDto).Name}> load complete");
|
||||
isLoading = false;
|
||||
db.Database.SetCommandTimeout(defaultTimeout);
|
||||
}
|
||||
|
||||
private static async Task<TelemetryDataCacheItem?> GetOrDefaultCacheDataFromDbAsync<TEntity>(IAsbCloudDbContext db, int idTelemetry, int capacity, double hoursOffset, CancellationToken token)
|
||||
|
Loading…
Reference in New Issue
Block a user