temp: skip list 48

too large for current algorithm to snapshot. crashes and never finishes.
This commit is contained in:
Collin Barrett 2018-02-11 16:54:45 -06:00
parent 312a81c20f
commit 4b06a7200a

View file

@ -12,6 +12,9 @@ public class SnapshotService
{
private readonly FilterListsDbContext dbContext;
//lists too large to snapshot with current algorithm
private readonly List<int> ignoreLists = new List<int> {48};
public SnapshotService(FilterListsDbContext dbContext)
{
this.dbContext = dbContext;
@ -37,11 +40,12 @@ private async Task<IEnumerable<FilterListViewUrlDto>> GetListsToCapture(int batc
return await dbContext
.FilterLists
.Where(list =>
!list.Snapshots.Any() ||
list.Snapshots
.Select(ss => ss.CreatedDateUtc)
.OrderByDescending(sscd => sscd)
.FirstOrDefault() < DateTime.UtcNow.AddDays(-1))
(!list.Snapshots.Any() ||
list.Snapshots
.Select(ss => ss.CreatedDateUtc)
.OrderByDescending(sscd => sscd)
.FirstOrDefault() < DateTime.UtcNow.AddDays(-1)) &&
!ignoreLists.Contains(list.Id))
.OrderBy(list => list.Snapshots.Any())
.ThenBy(list =>
list.Snapshots