mirror of
https://gitee.com/iioter/iotgateway.git
synced 2024-11-29 18:28:09 +08:00
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.DeviceVariables).AsNoTracking().ToList();
|
||||
_logger.LogInformation($"Loaded Devices Count:{devices.Count()}");
|
||||
Parallel.ForEach(devices, CreateDeviceThread);
|
||||
foreach (var device in devices)
|
||||
{
|
||||
CreateDeviceThread(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -114,7 +114,7 @@ namespace Plugin
|
||||
public void LoadAllDrivers()
|
||||
{
|
||||
_logger.LogInformation("LoadAllDrivers Start");
|
||||
Parallel.ForEach(_driverFiles, file =>
|
||||
foreach (var file in _driverFiles)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -134,7 +134,7 @@ namespace Plugin
|
||||
{
|
||||
_logger.LogError(ex, $"LoadAllDrivers Error {file}");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_logger.LogInformation($"LoadAllDrivers End,Count{DriverInfos.Count}");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user