mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
don't keep retrying snapshots of failed lists
This commit is contained in:
parent
61cb73a66a
commit
44a2dd2e95
1 changed files with 0 additions and 7 deletions
|
|
@ -13,12 +13,6 @@ namespace FilterLists.Services.Snapshot
|
|||
{
|
||||
public class SnapshotService : Service
|
||||
{
|
||||
private readonly Expression<Func<Data.Entities.FilterList, bool>> ifLastSnapFailed =
|
||||
l => l.Snapshots
|
||||
.OrderByDescending(s => s.CreatedDateUtc)
|
||||
.Select(s => s.WasUpdated && !s.WasSuccessful)
|
||||
.FirstOrDefault();
|
||||
|
||||
private readonly Expression<Func<Data.Entities.FilterList, DateTime?>> lastSnapTimestamp =
|
||||
l => l.Snapshots
|
||||
.Select(s => s.CreatedDateUtc)
|
||||
|
|
@ -55,7 +49,6 @@ private async Task<IEnumerable<FilterListViewUrlDto>> GetListsToCapture(int batc
|
|||
await DbContext
|
||||
.FilterLists
|
||||
.OrderBy(l => l.Snapshots.Any())
|
||||
.ThenByDescending(ifLastSnapFailed)
|
||||
.ThenBy(lastSnapTimestamp)
|
||||
.Take(batchSize)
|
||||
.ProjectTo<FilterListViewUrlDto>(MapConfig)
|
||||
|
|
|
|||
Loading…
Reference in a new issue