电梯代码优化

This commit is contained in:
yang.lee
2023-12-12 14:28:38 +08:00
parent 5fde13ece9
commit fbdc7de3b9
17 changed files with 275 additions and 282 deletions

View File

@@ -46,16 +46,16 @@ namespace Tnb.WarehouseMgr
{
foreach (var devName in s_heartbeatDevNames)
{
/* Dictionary<string, string> parameter = new()
{
["DevName"] = devName,
["TagName"] = ElevatorConsts.AGVKeepalive,
["Value"] = "123",
["token"] = _elevatorControlConfiguration.token
};
string result = await HttpClientHelper.GetAsync(_elevatorControlConfiguration.WriteTagUrl, pars: parameter);
*/
var result = await RedisHelper.HSetAsync(devName, ElevatorConsts.AGVKeepalive, "123");
Dictionary<string, string> parameter = new()
{
["DevName"] = devName,
["TagName"] = ElevatorConsts.AGVKeepalive,
["Value"] = "123",
["token"] = _elevatorControlConfiguration.token
};
string result = await HttpClientHelper.GetAsync(_elevatorControlConfiguration.WriteTagUrl, pars: parameter);
//var result = await RedisHelper.HSetAsync(devName, ElevatorConsts.AGVKeepalive, "123");
await Console.Out.WriteLineAsync($"{devName.Match(@"\d+")}#梯, 心跳检测结果:{result}");
}
}, stoppingToken, 30);