1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

New: Various HealthCheck Improvements

This commit is contained in:
bakerboy448
2023-03-26 23:30:27 -05:00
committed by GitHub
parent 0321368cc3
commit 0f6f681438
7 changed files with 517 additions and 9 deletions
@@ -1,5 +1,6 @@
using System;
using System.Linq;
using System.Net.Http;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore.Events;
@@ -33,6 +34,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
public override HealthCheck Check()
{
// Only check clients not in failure status, those get another message
var clients = _downloadClientProvider.GetDownloadClients();
var rootFolders = _rootFolderService.All();
@@ -42,7 +44,6 @@ namespace NzbDrone.Core.HealthCheck.Checks
{
var status = client.GetStatus();
var folders = status.OutputRootFolders;
foreach (var folder in folders)
{
if (rootFolders.Any(r => r.Path.PathEquals(folder.FullPath)))
@@ -55,6 +56,10 @@ namespace NzbDrone.Core.HealthCheck.Checks
{
_logger.Debug(ex, "Unable to communicate with {0}", client.Definition.Name);
}
catch (HttpRequestException ex)
{
_logger.Debug(ex, "Unable to communicate with {0}", client.Definition.Name);
}
catch (Exception ex)
{
_logger.Error(ex, "Unknown error occurred in DownloadClientRootFolderCheck HealthCheck");