取消不必要的错误日志

This commit is contained in:
Kimdiego2098
2023-07-25 20:50:33 +08:00
parent b4bf3b5138
commit 4c64c969bb
2 changed files with 14 additions and 0 deletions

View File

@@ -531,6 +531,13 @@ public class CollectDeviceWorker : BackgroundService
await Task.Delay(300000, stoppingToken);
}
catch (TaskCanceledException)
{
}
catch (ObjectDisposedException)
{
}
catch (Exception ex)
{
_logger.LogError(ex, ToString());

View File

@@ -392,6 +392,13 @@ public class UploadDeviceWorker : BackgroundService
}
await Task.Delay(300000, stoppingToken);
}
catch (TaskCanceledException)
{
}
catch (ObjectDisposedException)
{
}
catch (Exception ex)
{
_logger.LogError(ex, ToString());