Revert "snapshot each list only once per week"

This reverts commit 466071c032.
This commit is contained in:
Collin M. Barrett 2018-08-31 06:36:11 -05:00
parent 8d4e2d0c4f
commit bd2b6b46e7

View file

@ -39,11 +39,7 @@ private async Task CleanupFailedSnapshots()
private async Task<IEnumerable<FilterListViewUrlDto>> 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