1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Revert "Handle events asynchronously for notifications"

This reverts commit 46da657740.
This commit is contained in:
Mark McDowall 2021-04-09 10:36:56 -07:00
parent 46da657740
commit 7da695bd62

View File

@ -15,12 +15,12 @@
namespace NzbDrone.Core.Notifications namespace NzbDrone.Core.Notifications
{ {
public class NotificationService public class NotificationService
: IHandleAsync<EpisodeGrabbedEvent>, : IHandle<EpisodeGrabbedEvent>,
IHandleAsync<EpisodeImportedEvent>, IHandle<EpisodeImportedEvent>,
IHandleAsync<SeriesRenamedEvent>, IHandle<SeriesRenamedEvent>,
IHandleAsync<SeriesDeletedEvent>, IHandle<SeriesDeletedEvent>,
IHandleAsync<EpisodeFileDeletedEvent>, IHandle<EpisodeFileDeletedEvent>,
IHandleAsync<HealthCheckFailedEvent>, IHandle<HealthCheckFailedEvent>,
IHandleAsync<DeleteCompletedEvent>, IHandleAsync<DeleteCompletedEvent>,
IHandleAsync<DownloadsProcessedEvent>, IHandleAsync<DownloadsProcessedEvent>,
IHandleAsync<RenameCompletedEvent>, IHandleAsync<RenameCompletedEvent>,
@ -109,7 +109,7 @@ private bool ShouldHandleHealthFailure(HealthCheck.HealthCheck healthCheck, bool
return false; return false;
} }
public void HandleAsync(EpisodeGrabbedEvent message) public void Handle(EpisodeGrabbedEvent message)
{ {
var grabMessage = new GrabMessage var grabMessage = new GrabMessage
{ {
@ -136,7 +136,7 @@ public void HandleAsync(EpisodeGrabbedEvent message)
} }
} }
public void HandleAsync(EpisodeImportedEvent message) public void Handle(EpisodeImportedEvent message)
{ {
if (!message.NewDownload) if (!message.NewDownload)
{ {
@ -174,7 +174,7 @@ public void HandleAsync(EpisodeImportedEvent message)
} }
} }
public void HandleAsync(SeriesRenamedEvent message) public void Handle(SeriesRenamedEvent message)
{ {
foreach (var notification in _notificationFactory.OnRenameEnabled()) foreach (var notification in _notificationFactory.OnRenameEnabled())
{ {
@ -193,7 +193,7 @@ public void HandleAsync(SeriesRenamedEvent message)
} }
} }
public void HandleAsync(EpisodeFileDeletedEvent message) public void Handle(EpisodeFileDeletedEvent message)
{ {
if (message.EpisodeFile.Episodes.Value.Empty()) if (message.EpisodeFile.Episodes.Value.Empty())
{ {
@ -227,7 +227,7 @@ public void HandleAsync(EpisodeFileDeletedEvent message)
} }
} }
public void HandleAsync(SeriesDeletedEvent message) public void Handle(SeriesDeletedEvent message)
{ {
var deleteMessage = new SeriesDeleteMessage(message.Series,message.DeleteFiles); var deleteMessage = new SeriesDeleteMessage(message.Series,message.DeleteFiles);
@ -247,7 +247,7 @@ public void HandleAsync(SeriesDeletedEvent message)
} }
} }
public void HandleAsync(HealthCheckFailedEvent message) public void Handle(HealthCheckFailedEvent message)
{ {
foreach (var notification in _notificationFactory.OnHealthIssueEnabled()) foreach (var notification in _notificationFactory.OnHealthIssueEnabled())
{ {