mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
cleanup orphaned rules
This commit is contained in:
parent
b6ea968e8c
commit
d226564eb0
1 changed files with 1 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ public async Task CaptureAsync(int batchSize)
|
|||
private async Task CleanupFailedSnapshots()
|
||||
{
|
||||
DbContext.RemoveRange(DbContext.SnapshotRules.Where(sr => !sr.Snapshot.WasSuccessful));
|
||||
DbContext.RemoveRange(DbContext.Rules.Where(r => !r.SnapshotRules.Any()));
|
||||
await DbContext.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue