Misc HealthCheck Cleanup and Sonarr Alignment

pull/8147/head
Bakerboy448 2 years ago committed by Qstick
parent ac8085fb59
commit e2445a61b6

@ -67,7 +67,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.Error(ex, "Unknown error occured in DownloadClientRootFolderCheck HealthCheck"); _logger.Error(ex, "Unknown error occurred in DownloadClientRootFolderCheck HealthCheck");
} }
} }

@ -5,11 +5,14 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Core.ImportLists; using NzbDrone.Core.ImportLists;
using NzbDrone.Core.Localization; using NzbDrone.Core.Localization;
using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.MediaFiles.Events;
using NzbDrone.Core.Movies.Events;
using NzbDrone.Core.ThingiProvider.Events; using NzbDrone.Core.ThingiProvider.Events;
namespace NzbDrone.Core.HealthCheck.Checks namespace NzbDrone.Core.HealthCheck.Checks
{ {
[CheckOn(typeof(ProviderUpdatedEvent<IImportList>))] [CheckOn(typeof(ProviderUpdatedEvent<IImportList>))]
[CheckOn(typeof(MoviesDeletedEvent))]
[CheckOn(typeof(MovieMovedEvent))]
[CheckOn(typeof(MovieFileImportedEvent), CheckOnCondition.FailedOnly)] [CheckOn(typeof(MovieFileImportedEvent), CheckOnCondition.FailedOnly)]
[CheckOn(typeof(MovieImportFailedEvent), CheckOnCondition.SuccessfulOnly)] [CheckOn(typeof(MovieImportFailedEvent), CheckOnCondition.SuccessfulOnly)]
public class ImportListRootFolderCheck : HealthCheckBase public class ImportListRootFolderCheck : HealthCheckBase

@ -27,7 +27,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
var backOffProviders = enabledProviders.Join(_providerStatusService.GetBlockedProviders(), var backOffProviders = enabledProviders.Join(_providerStatusService.GetBlockedProviders(),
i => i.Definition.Id, i => i.Definition.Id,
s => s.ProviderId, s => s.ProviderId,
(i, s) => new { Provider = i, Status = s }) (i, s) => new { ImportList = i, Status = s })
.ToList(); .ToList();
if (backOffProviders.Empty()) if (backOffProviders.Empty())
@ -40,7 +40,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("ImportListStatusCheckAllClientMessage"), "#lists-are-unavailable-due-to-failures"); return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("ImportListStatusCheckAllClientMessage"), "#lists-are-unavailable-due-to-failures");
} }
return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("ImportListStatusCheckSingleClientMessage"), string.Join(", ", backOffProviders.Select(v => v.Provider.Definition.Name))), "#lists-are-unavailable-due-to-failures"); return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("ImportListStatusCheckSingleClientMessage"), string.Join(", ", backOffProviders.Select(v => v.ImportList.Definition.Name))), "#lists-are-unavailable-due-to-failures");
} }
} }
} }

@ -5,7 +5,6 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.Datastore.Events;
using NzbDrone.Core.Localization; using NzbDrone.Core.Localization;
using NzbDrone.Core.Movies.Collections; using NzbDrone.Core.Movies.Collections;
using NzbDrone.Core.Movies.Events;
using NzbDrone.Core.RootFolders; using NzbDrone.Core.RootFolders;
namespace NzbDrone.Core.HealthCheck.Checks namespace NzbDrone.Core.HealthCheck.Checks

@ -21,7 +21,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
[CheckOn(typeof(ProviderUpdatedEvent<IDownloadClient>))] [CheckOn(typeof(ProviderUpdatedEvent<IDownloadClient>))]
[CheckOn(typeof(ProviderDeletedEvent<IDownloadClient>))] [CheckOn(typeof(ProviderDeletedEvent<IDownloadClient>))]
[CheckOn(typeof(ModelEvent<RemotePathMapping>))] [CheckOn(typeof(ModelEvent<RemotePathMapping>))]
[CheckOn(typeof(MovieFileImportedEvent), CheckOnCondition.FailedOnly)] [CheckOn(typeof(MovieImportFailedEvent), CheckOnCondition.SuccessfulOnly)]
[CheckOn(typeof(MovieImportFailedEvent), CheckOnCondition.SuccessfulOnly)] [CheckOn(typeof(MovieImportFailedEvent), CheckOnCondition.SuccessfulOnly)]
public class RemotePathMappingCheck : HealthCheckBase, IProvideHealthCheck public class RemotePathMappingCheck : HealthCheckBase, IProvideHealthCheck
{ {

Loading…
Cancel
Save