mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
temp: skip list 48
too large for current algorithm to snapshot. crashes and never finishes.
This commit is contained in:
parent
312a81c20f
commit
4b06a7200a
1 changed files with 9 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue