mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: Provider HealthChecks persist after add until next scheduled check.
This commit is contained in:
parent
40736336db
commit
526e091d22
@ -6,6 +6,7 @@
|
||||
|
||||
namespace NzbDrone.Core.HealthCheck.Checks
|
||||
{
|
||||
[CheckOn(typeof(ProviderAddedEvent<IDownloadClient>))]
|
||||
[CheckOn(typeof(ProviderUpdatedEvent<IDownloadClient>))]
|
||||
[CheckOn(typeof(ProviderDeletedEvent<IDownloadClient>))]
|
||||
public class DownloadClientCheck : HealthCheckBase
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
namespace NzbDrone.Core.HealthCheck.Checks
|
||||
{
|
||||
[CheckOn(typeof(ProviderAddedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderUpdatedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderDeletedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderStatusChangedEvent<IIndexer>))]
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
namespace NzbDrone.Core.HealthCheck.Checks
|
||||
{
|
||||
[CheckOn(typeof(ProviderAddedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderUpdatedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderDeletedEvent<IIndexer>))]
|
||||
[CheckOn(typeof(ProviderStatusChangedEvent<IIndexer>))]
|
||||
|
@ -0,0 +1,14 @@
|
||||
using NzbDrone.Common.Messaging;
|
||||
|
||||
namespace NzbDrone.Core.ThingiProvider.Events
|
||||
{
|
||||
public class ProviderAddedEvent<TProvider> : IEvent
|
||||
{
|
||||
public ProviderDefinition Definition { get; private set; }
|
||||
|
||||
public ProviderAddedEvent(ProviderDefinition definition)
|
||||
{
|
||||
Definition = definition;
|
||||
}
|
||||
}
|
||||
}
|
@ -98,7 +98,9 @@ public TProviderDefinition Get(int id)
|
||||
|
||||
public virtual TProviderDefinition Create(TProviderDefinition definition)
|
||||
{
|
||||
return _providerRepository.Insert(definition);
|
||||
var addedDefinition = _providerRepository.Insert(definition);
|
||||
_eventAggregator.PublishEvent(new ProviderAddedEvent<TProvider>(definition));
|
||||
return addedDefinition;
|
||||
}
|
||||
|
||||
public virtual void Update(TProviderDefinition definition)
|
||||
|
Loading…
Reference in New Issue
Block a user