初步完成历史记录(未完成)

This commit is contained in:
2025-09-11 11:04:07 +08:00
parent 3c47276406
commit 5ca4fe7124
18 changed files with 471 additions and 3 deletions

View File

@@ -200,7 +200,11 @@ public class OpcUaBackgroundService : BackgroundService
// 遍历_opcUaDevices中的所有设备尝试连接
foreach (var device in _opcUaDevices.Values.ToList())
{
connectTasks.Add(ConnectSingleOpcUaDeviceAsync(device, stoppingToken));
if (device.IsActive)
{
connectTasks.Add(ConnectSingleOpcUaDeviceAsync(device, stoppingToken));
}
}
await Task.WhenAll(connectTasks);