temp comment failed cleanup

This commit is contained in:
Collin Barrett 2018-09-04 18:52:30 -05:00
parent 746ece25ab
commit e1e04b2e2b

View file

@ -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<Snapshot>(lists);
@ -41,6 +41,7 @@ public async Task CaptureAsync(int batchSize)
await CreateAndSaveSnaps<SnapshotWayback>(listsToRetry);
}
//TODO: speed this up, too slow, loads all into memory
private async Task CleanupFailedSnapshots()
{
DbContext.RemoveRange(DbContext.SnapshotRules.Where(sr => !sr.Snapshot.WasSuccessful));