添加日志
This commit is contained in:
@@ -548,6 +548,10 @@ namespace BLWLogProduce.Services
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (poo.cmd_word.Equals("0E")&&poo.fault_list.Count==0&&poo.device_list.Count==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string TopicKey1 = KafkaKey.BLWLog4NodeJs_RCU_Action_Topic;
|
||||
string DetailKey1 = poo.frame_id.ToString();
|
||||
|
||||
@@ -662,6 +666,7 @@ namespace BLWLogProduce.Services
|
||||
try
|
||||
{
|
||||
|
||||
MyPublishRedis.redis6.Set("ChangLiang", "1", 3600); //设置过期时间1小时,离线事件靠过期事件触发
|
||||
string body = args.Body;
|
||||
CommonEntity.OnOffLineData? usa = System.Text.Json.JsonSerializer.Deserialize<CommonEntity.OnOffLineData>(body);
|
||||
|
||||
@@ -677,6 +682,7 @@ namespace BLWLogProduce.Services
|
||||
logger.Error("RCUOnOffLine:" + body);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
string Key1 = KafkaKey.BLWLog4NodeJs_RCU_OnOffLine_Topic;
|
||||
string Key2 = usa.HostNumber;
|
||||
@@ -790,9 +796,26 @@ namespace BLWLogProduce.Services
|
||||
{
|
||||
string body = args.Body;
|
||||
NewVersionHexData? usa = System.Text.Json.JsonSerializer.Deserialize<NewVersionHexData>(body);
|
||||
byte[] bytes = MyMessagePacker.FastSerialize(usa);
|
||||
string TopicKey = KafkaKey.BLWLog_RCU_Topic;
|
||||
string DetailKey = KafkaKey.RCUNewVersion_RestartReason;
|
||||
|
||||
RestartIOTData rrr = new RestartIOTData()
|
||||
{
|
||||
HotelCode = usa.HotelCode,
|
||||
HostNumber = usa.HostNumber,
|
||||
MAC = usa.MAC,
|
||||
RoomNumber = usa.RoomNumber,
|
||||
EndPoint = usa.RemoteEndPoint,
|
||||
CurrentStatus = usa.CurrentStatus,
|
||||
CurrentTime = usa.CurrentTime,
|
||||
UnixTime = Tools.GetUnixTime_MS(),
|
||||
LauncherVersion= usa.LauncherVersion,
|
||||
RebootReason= usa.RebootReason
|
||||
};
|
||||
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(rrr));
|
||||
|
||||
//byte[] bytes = MyMessagePacker.FastSerialize(rrr);
|
||||
string TopicKey = KafkaKey.BLWLog4NodeJs_RCU_OnOffLine_Topic;
|
||||
string DetailKey = usa.HotelCode;
|
||||
var dr = await p.ProduceAsync(TopicKey, new Message<string, byte[]> { Key = DetailKey, Value = bytes });
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -956,6 +979,7 @@ namespace BLWLogProduce.Services
|
||||
//新版本日志
|
||||
CSRedisCacheHelper.redis3.Subscribe(TSLog_DingYue);
|
||||
CSRedisCacheHelper.redis3.Subscribe(TSLog_DingYue_0X36);
|
||||
CSRedisCacheHelper.redis3.Subscribe(DingYue11);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user