From e1e04b2e2b6bea4ab8cf95909584c3cd56fd0ad0 Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Tue, 4 Sep 2018 18:52:30 -0500 Subject: [PATCH] temp comment failed cleanup --- src/FilterLists.Services/Snapshot/SnapshotService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Services/Snapshot/SnapshotService.cs b/src/FilterLists.Services/Snapshot/SnapshotService.cs index 8b383590f..66366bf98 100644 --- a/src/FilterLists.Services/Snapshot/SnapshotService.cs +++ b/src/FilterLists.Services/Snapshot/SnapshotService.cs @@ -33,7 +33,7 @@ public SnapshotService(FilterListsDbContext dbContext, IConfigurationProvider ma public async Task CaptureAsync(int batchSize) { - await CleanupFailedSnapshots(); + //await CleanupFailedSnapshots(); uaString = await UserAgentService.GetMostPopularString(); var lists = await GetListsToCapture(batchSize); var snaps = await CreateAndSaveSnaps(lists); @@ -41,6 +41,7 @@ public async Task CaptureAsync(int batchSize) await CreateAndSaveSnaps(listsToRetry); } + //TODO: speed this up, too slow, loads all into memory private async Task CleanupFailedSnapshots() { DbContext.RemoveRange(DbContext.SnapshotRules.Where(sr => !sr.Snapshot.WasSuccessful));