mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
revert cleanup orphaned rules (snap perf hit)
This commit is contained in:
parent
514a03e9cf
commit
b9fdb66138
1 changed files with 0 additions and 16 deletions
|
|
@ -36,12 +36,6 @@ public async Task CaptureAsync(int batchSize)
|
|||
}
|
||||
|
||||
private async Task CleanupFailedSnapshots()
|
||||
{
|
||||
await CleanupOrphanedSnapshotsRules();
|
||||
await CleanupOrphanedRules();
|
||||
}
|
||||
|
||||
private async Task CleanupOrphanedSnapshotsRules()
|
||||
{
|
||||
const string command =
|
||||
@"DELETE snapshots_rules
|
||||
|
|
@ -50,16 +44,6 @@ FROM snapshots_rules
|
|||
WHERE snapshots.WasSuccessful = 0;";
|
||||
await DbContext.Database.ExecuteSqlCommandAsync(command);
|
||||
}
|
||||
|
||||
private async Task CleanupOrphanedRules()
|
||||
{
|
||||
const string command =
|
||||
@"DELETE rules
|
||||
FROM rules
|
||||
LEFT JOIN snapshots_rules ON rules.Id = snapshots_rules.RuleId
|
||||
WHERE snapshots_rules.RuleId IS NULL;";
|
||||
await DbContext.Database.ExecuteSqlCommandAsync(command);
|
||||
}
|
||||
|
||||
private async Task<IEnumerable<FilterListViewUrlDto>> GetListsToCapture(int batchSize) =>
|
||||
await DbContext
|
||||
|
|
|
|||
Loading…
Reference in a new issue