fix: device and driver
This commit is contained in:
parent
dfb56687d7
commit
3e42f072e5
@ -40,7 +40,10 @@ namespace Plugin
|
|||||||
.Include(x => x.Parent).Include(x => x.Driver).Include(x => x.DeviceConfigs)
|
.Include(x => x.Parent).Include(x => x.Driver).Include(x => x.DeviceConfigs)
|
||||||
.Include(x => x.DeviceVariables).AsNoTracking().ToList();
|
.Include(x => x.DeviceVariables).AsNoTracking().ToList();
|
||||||
_logger.LogInformation($"Loaded Devices Count:{devices.Count()}");
|
_logger.LogInformation($"Loaded Devices Count:{devices.Count()}");
|
||||||
Parallel.ForEach(devices, CreateDeviceThread);
|
foreach (var device in devices)
|
||||||
|
{
|
||||||
|
CreateDeviceThread(device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -114,7 +114,7 @@ namespace Plugin
|
|||||||
public void LoadAllDrivers()
|
public void LoadAllDrivers()
|
||||||
{
|
{
|
||||||
_logger.LogInformation("LoadAllDrivers Start");
|
_logger.LogInformation("LoadAllDrivers Start");
|
||||||
Parallel.ForEach(_driverFiles, file =>
|
foreach (var file in _driverFiles)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ namespace Plugin
|
|||||||
{
|
{
|
||||||
_logger.LogError(ex, $"LoadAllDrivers Error {file}");
|
_logger.LogError(ex, $"LoadAllDrivers Error {file}");
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user