forked from ddrilling/AsbCloudServer
GtrWitsRepository.GetRangeAsync() увеличил таймаут долгого запроса
This commit is contained in:
parent
57e73eadd9
commit
5f4a4cee9f
@ -9,6 +9,7 @@ using AsbCloudDb.Model;
|
|||||||
using AsbCloudDb.Model.GTR;
|
using AsbCloudDb.Model.GTR;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -106,6 +107,7 @@ public class GtrWitsRepository : IGtrRepository
|
|||||||
Min = group.Min(e => e.DateTime),
|
Min = group.Min(e => e.DateTime),
|
||||||
Max = group.Max(e => e.DateTime)
|
Max = group.Max(e => e.DateTime)
|
||||||
});
|
});
|
||||||
|
db.Database.SetCommandTimeout(5*60);
|
||||||
var range = await groupedQuery.FirstOrDefaultAsync(token);
|
var range = await groupedQuery.FirstOrDefaultAsync(token);
|
||||||
|
|
||||||
if (range is null)
|
if (range is null)
|
||||||
|
Loading…
Reference in New Issue
Block a user