From a58f1484980b1e970c5ba789d8201e6160e507bb Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 17 Dec 2024 14:47:58 -0600 Subject: prune searches every 5 minutes --- src/slskd/Application.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index d7b9ba34..c15f741b 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1007,6 +1007,7 @@ namespace slskd private void Clock_EveryFiveMinutes(object sender, ClockEventArgs e) { + _ = Task.Run(() => PruneSearches()); _ = Task.Run(() => PruneTransfers()); } @@ -1018,7 +1019,6 @@ namespace slskd private void Clock_EveryHour(object sender, ClockEventArgs e) { _ = Task.Run(() => MaybeRescanShares()); - _ = Task.Run(() => PruneSearches()); } private async Task MaybeRescanShares() @@ -1147,7 +1147,7 @@ namespace slskd } } - private void PruneSearches() + private async Task PruneSearches() { var age = OptionsMonitor.CurrentValue.Retention.Search; @@ -1155,7 +1155,7 @@ namespace slskd { try { - var pruned = Search.Prune(age.Value); + var pruned = await Search.PruneAsync(age.Value); Log.Debug("Pruned {Count} search records", pruned); } catch -- cgit v1.2.3