From bd2b6b46e7bd3e1dc74f9bfcab55d43cf86fc915 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 31 Aug 2018 06:36:11 -0500 Subject: [PATCH] Revert "snapshot each list only once per week" This reverts commit 466071c032494f8948c17f07dad5b1fd9e6c8871. --- src/FilterLists.Services/Snapshot/SnapshotService.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/FilterLists.Services/Snapshot/SnapshotService.cs b/src/FilterLists.Services/Snapshot/SnapshotService.cs index 2cf91339f..539b1f971 100644 --- a/src/FilterLists.Services/Snapshot/SnapshotService.cs +++ b/src/FilterLists.Services/Snapshot/SnapshotService.cs @@ -39,11 +39,7 @@ private async Task CleanupFailedSnapshots() private async Task> GetListsToCapture(int batchSize) => await DbContext .FilterLists - .Where(l => l.Snapshots - .OrderByDescending(s => s.CreatedDateUtc) - .Select(s => s.CreatedDateUtc) - .FirstOrDefault() <= DateTime.Now.AddDays(-7) && - !(l.ViewUrl.StartsWith(WaybackService.WaybackMachineUrlPrefix) && + .Where(l => !(l.ViewUrl.StartsWith(WaybackService.WaybackMachineUrlPrefix) && l.Snapshots.Any(s => s.WasSuccessful))) .OrderBy(l => l.Snapshots.Any()) .ThenBy(l => l.Snapshots