mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-24 22:36:19 -04:00
Fixed: Refreshing Plex Server series in high volume systems
This commit is contained in:
@@ -17,7 +17,10 @@ namespace NzbDrone.Core.Notifications
|
||||
: IHandle<EpisodeGrabbedEvent>,
|
||||
IHandle<EpisodeImportedEvent>,
|
||||
IHandle<SeriesRenamedEvent>,
|
||||
IHandle<HealthCheckFailedEvent>
|
||||
IHandle<HealthCheckFailedEvent>,
|
||||
IHandleAsync<DownloadsProcessedEvent>,
|
||||
IHandleAsync<RenameCompletedEvent>,
|
||||
IHandleAsync<HealthCheckCompleteEvent>
|
||||
{
|
||||
private readonly INotificationFactory _notificationFactory;
|
||||
private readonly Logger _logger;
|
||||
@@ -204,5 +207,35 @@ namespace NzbDrone.Core.Notifications
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAsync(DownloadsProcessedEvent message)
|
||||
{
|
||||
ProcessQueue();
|
||||
}
|
||||
|
||||
public void HandleAsync(RenameCompletedEvent message)
|
||||
{
|
||||
ProcessQueue();
|
||||
}
|
||||
|
||||
public void HandleAsync(HealthCheckCompleteEvent message)
|
||||
{
|
||||
ProcessQueue();
|
||||
}
|
||||
|
||||
private void ProcessQueue()
|
||||
{
|
||||
foreach (var notification in _notificationFactory.GetAvailableProviders())
|
||||
{
|
||||
try
|
||||
{
|
||||
notification.ProcessQueue();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Warn(ex, "Unable to process notification queue for " + notification.Definition.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user