GtrWitsRepository.GetRangeAsync() увеличил таймаут долгого запроса

This commit is contained in:
ngfrolov 2024-08-29 16:24:00 +05:00
parent 57e73eadd9
commit 5f4a4cee9f
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -9,6 +9,7 @@ using AsbCloudDb.Model;
using AsbCloudDb.Model.GTR;
using Mapster;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@ -106,6 +107,7 @@ public class GtrWitsRepository : IGtrRepository
Min = group.Min(e => e.DateTime),
Max = group.Max(e => e.DateTime)
});
db.Database.SetCommandTimeout(5*60);
var range = await groupedQuery.FirstOrDefaultAsync(token);
if (range is null)