修改redis
parent
1ab9281ca2
commit
a5b9bb2c9c
|
|
@ -43,6 +43,7 @@ using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData;
|
||||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||||
using Directory = System.IO.Directory;
|
using Directory = System.IO.Directory;
|
||||||
using RangeHeaderValue = System.Net.Http.Headers.RangeHeaderValue;
|
using RangeHeaderValue = System.Net.Http.Headers.RangeHeaderValue;
|
||||||
|
using SqlSugar.SplitTableExtensions;
|
||||||
|
|
||||||
namespace OpenAuth.App.ServiceApp
|
namespace OpenAuth.App.ServiceApp
|
||||||
{
|
{
|
||||||
|
|
@ -3451,7 +3452,13 @@ WHERE
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
foreach (var uav in list)
|
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))
|
if (!string.IsNullOrEmpty(droneredis))
|
||||||
{
|
{
|
||||||
//判断是大疆还是固定翼
|
//判断是大疆还是固定翼
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ namespace OpenAuth.WebApi.Model.mqtt.ChannelDB
|
||||||
private readonly ILogger<LogBatchWriter> _logger;
|
private readonly ILogger<LogBatchWriter> _logger;
|
||||||
|
|
||||||
private const int BatchSize = 100;
|
private const int BatchSize = 100;
|
||||||
private const int FlushIntervalMs = 10000;
|
private const int FlushIntervalMs = 5000;
|
||||||
|
|
||||||
public LogBatchWriter(LogQueueService queue, IServiceScopeFactory scopeFactory, ILogger<LogBatchWriter> logger)
|
public LogBatchWriter(LogQueueService queue, IServiceScopeFactory scopeFactory, ILogger<LogBatchWriter> logger)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue