diff --git a/NzbDrone.Core/Datastore/BasicRepository.cs b/NzbDrone.Core/Datastore/BasicRepository.cs index a2c07813a..18f6bf3b7 100644 --- a/NzbDrone.Core/Datastore/BasicRepository.cs +++ b/NzbDrone.Core/Datastore/BasicRepository.cs @@ -194,10 +194,17 @@ namespace NzbDrone.Core.Datastore } - protected virtual void PublishModelEvent(TModel model, RepositoryAction action) + private void PublishModelEvent(TModel model, RepositoryAction action) { - _messageAggregator.PublishEvent(new ModelEvent(model, action)); + if (PublishModelEvents) + { + _messageAggregator.PublishEvent(new ModelEvent(model, action)); + } } + protected virtual bool PublishModelEvents + { + get { return false; } + } } } diff --git a/NzbDrone.Core/Instrumentation/LogRepository.cs b/NzbDrone.Core/Instrumentation/LogRepository.cs index 4858eaedd..abba443e8 100644 --- a/NzbDrone.Core/Instrumentation/LogRepository.cs +++ b/NzbDrone.Core/Instrumentation/LogRepository.cs @@ -23,10 +23,5 @@ namespace NzbDrone.Core.Instrumentation var oldIds = Query.Where(c => c.Time < DateTime.Now.AddDays(-30).Date).Select(c => c.Id); DeleteMany(oldIds); } - - protected override void PublishModelEvent(Log model, Datastore.Events.RepositoryAction action) - { - //Don't publish log added events. - } } } \ No newline at end of file