Browse Source

fix: 去掉调试痕迹

master
fajiao 2 years ago
parent
commit
5568a6a7c2
  1. 32
      Cis.Application/Core/Center/CameraDataCenter.cs

32
Cis.Application/Core/Center/CameraDataCenter.cs

@ -86,19 +86,13 @@ public class CameraDataCenter : ISingleton
/// </summary>
private async Task RefreshCameraPtzInfos()
{
try
{
string[] cameraIpList = await _cache.HKeysAsync(CacheInfo.CameraIpCounts);
List<Task> 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<Task> tasks = new();
foreach (string cameraIp in cameraIpList)
{
tasks.Add(RefreshCameraPtzInfo(cameraIp));
}
await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout));
}
/// <summary>
@ -118,19 +112,13 @@ public class CameraDataCenter : ISingleton
/// </summary>
private async Task RefreshMarkSearchers()
{
try
{
string[] cameraIdList = await _cache.HKeysAsync(CacheInfo.CameraId2Ip);
List<Task> 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<Task> tasks = new();
foreach (string cameraId in cameraIdList)
{
tasks.Add(RefreshMarkSearcher(cameraId.ToLong()));
}
await Task.WhenAny(Task.WhenAll(tasks), Task.Delay(_options.CameraPtz.Timeout));
}
/// <summary>

Loading…
Cancel
Save