From 5d6851011b500e2dfdf5e3273958100003fea75f Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Sat, 25 Aug 2018 08:59:21 -0500 Subject: [PATCH] only skip hardcoded wayback snapshots if it has a previous success ref #325 --- src/FilterLists.Services/Snapshot/SnapshotService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FilterLists.Services/Snapshot/SnapshotService.cs b/src/FilterLists.Services/Snapshot/SnapshotService.cs index 253a69e5c..14484e946 100644 --- a/src/FilterLists.Services/Snapshot/SnapshotService.cs +++ b/src/FilterLists.Services/Snapshot/SnapshotService.cs @@ -34,13 +34,13 @@ private async Task> GetListsToCapture(int batc await DbContext .FilterLists .Where(l => !l.CantSnapshot && + !(l.ViewUrl.StartsWith(WaybackService.WaybackMachineUrlPrefix) && + l.Snapshots.Any(s => s.WasSuccessful)) && (!l.Snapshots.Any() || l.Snapshots .Select(s => s.CreatedDateUtc) .OrderByDescending(d => d) - .First() < yesterday && - !l.ViewUrl - .StartsWith(WaybackService.WaybackMachineUrlPrefix))) + .First() < yesterday)) .OrderBy(l => l.Snapshots.Any()) .ThenBy(l => l.Snapshots .OrderByDescending(s => s.CreatedDateUtc)