temp comment failed cleanup

This commit is contained in:
Collin M. Barrett 2018-09-04 18:52:30 -05:00
parent 06be78e825
commit 3cfa7b9557

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));