Monitor and Process downloads separately

New: Queue remains up to date while importing file from remote file system
Fixed: Failed downloads still in queue won't result in failed search
This commit is contained in:
Mark McDowall
2019-10-24 21:42:41 +01:00
committed by ta264
parent a70e7e4778
commit 94ac75c6b7
40 changed files with 1108 additions and 497 deletions
@@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.Download
SkipReDownload = true
};
Subject.HandleAsync(failedEvent);
Subject.Handle(failedEvent);
Mocker.GetMock<IManageCommandQueue>()
.Verify(x => x.Push(It.IsAny<Command>(), It.IsAny<CommandPriority>(), It.IsAny<CommandTrigger>()),
@@ -56,7 +56,7 @@ namespace NzbDrone.Core.Test.Download
.Setup(x => x.AutoRedownloadFailed)
.Returns(false);
Subject.HandleAsync(failedEvent);
Subject.Handle(failedEvent);
Mocker.GetMock<IManageCommandQueue>()
.Verify(x => x.Push(It.IsAny<Command>(), It.IsAny<CommandPriority>(), It.IsAny<CommandTrigger>()),
@@ -72,7 +72,7 @@ namespace NzbDrone.Core.Test.Download
AlbumIds = new List<int> { 2 }
};
Subject.HandleAsync(failedEvent);
Subject.Handle(failedEvent);
Mocker.GetMock<IManageCommandQueue>()
.Verify(x => x.Push(It.Is<AlbumSearchCommand>(c => c.AlbumIds.Count == 1 &&
@@ -95,7 +95,7 @@ namespace NzbDrone.Core.Test.Download
AlbumIds = new List<int> { 2, 3 }
};
Subject.HandleAsync(failedEvent);
Subject.Handle(failedEvent);
Mocker.GetMock<IManageCommandQueue>()
.Verify(x => x.Push(It.Is<AlbumSearchCommand>(c => c.AlbumIds.Count == 2 &&
@@ -120,7 +120,7 @@ namespace NzbDrone.Core.Test.Download
AlbumIds = new List<int> { 1, 2, 3 }
};
Subject.HandleAsync(failedEvent);
Subject.Handle(failedEvent);
Mocker.GetMock<IManageCommandQueue>()
.Verify(x => x.Push(It.Is<ArtistSearchCommand>(c => c.ArtistId == failedEvent.ArtistId),