Clear failed Application Status on successful Test

pull/8/head
Qstick 4 years ago
parent c74208f9de
commit d70e08331f

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FluentValidation.Results;
using NLog; using NLog;
using NzbDrone.Common.Composition; using NzbDrone.Common.Composition;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
@ -57,5 +58,17 @@ namespace NzbDrone.Core.Applications
yield return application; yield return application;
} }
} }
public override ValidationResult Test(ApplicationDefinition definition)
{
var result = base.Test(definition);
if ((result == null || result.IsValid) && definition.Id != 0)
{
_applicationStatusService.RecordSuccess(definition.Id);
}
return result;
}
} }
} }

Loading…
Cancel
Save