diff --git a/Cis.Application/Core/Center/CameraDataCenter.cs b/Cis.Application/Core/Center/CameraDataCenter.cs index b724202..4b1db50 100644 --- a/Cis.Application/Core/Center/CameraDataCenter.cs +++ b/Cis.Application/Core/Center/CameraDataCenter.cs @@ -86,19 +86,13 @@ public class CameraDataCenter : ISingleton /// private async Task RefreshCameraPtzInfos() { - try - { - string[] cameraIpList = await _cache.HKeysAsync(CacheInfo.CameraIpCounts); - List tasks = new(); - foreach (string cameraIp in cameraIpList) - { - tasks.Add(RefreshCameraPtzInfo(cameraIp)); - } - await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout)); - } - catch (Exception e) + string[] cameraIpList = await _cache.HKeysAsync(CacheInfo.CameraIpCounts); + List tasks = new(); + foreach (string cameraIp in cameraIpList) { + tasks.Add(RefreshCameraPtzInfo(cameraIp)); } + await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout)); } /// @@ -118,19 +112,13 @@ public class CameraDataCenter : ISingleton /// private async Task RefreshMarkSearchers() { - try - { - string[] cameraIdList = await _cache.HKeysAsync(CacheInfo.CameraId2Ip); - List tasks = new(); - foreach (string cameraId in cameraIdList) - { - tasks.Add(RefreshMarkSearcher(cameraId.ToLong())); - } - await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout)); - } - catch (Exception e) + string[] cameraIdList = await _cache.HKeysAsync(CacheInfo.CameraId2Ip); + List tasks = new(); + foreach (string cameraId in cameraIdList) { + tasks.Add(RefreshMarkSearcher(cameraId.ToLong())); } + await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout)); } ///