修改redis

main
zhangbin 2026-03-16 15:06:00 +08:00
parent 1ab9281ca2
commit a5b9bb2c9c
2 changed files with 9 additions and 2 deletions

View File

@ -43,6 +43,7 @@ using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData;
using static Org.BouncyCastle.Math.EC.ECCurve;
using Directory = System.IO.Directory;
using RangeHeaderValue = System.Net.Http.Headers.RangeHeaderValue;
using SqlSugar.SplitTableExtensions;
namespace OpenAuth.App.ServiceApp
{
@ -3451,7 +3452,13 @@ WHERE
}).ToListAsync();
foreach (var uav in list)
{
var droneredis = _redisCacheContext.Get<string>(uav.Sn);
var sn = await db.LasaDronePort.AsQueryable().Where(r => r.Id == uav.PId).FirstAsync();
string droneredis = string.Empty;
if (sn != null)
{
droneredis = _redisCacheContext.Get<string>(sn.Sn);
}
//var droneredis = _redisCacheContext.Get<string>(sn.Sn);
if (!string.IsNullOrEmpty(droneredis))
{
//判断是大疆还是固定翼

View File

@ -13,7 +13,7 @@ namespace OpenAuth.WebApi.Model.mqtt.ChannelDB
private readonly ILogger<LogBatchWriter> _logger;
private const int BatchSize = 100;
private const int FlushIntervalMs = 10000;
private const int FlushIntervalMs = 5000;
public LogBatchWriter(LogQueueService queue, IServiceScopeFactory scopeFactory, ILogger<LogBatchWriter> logger)
{