1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

feat(storage): add limit parameter to ClearRemovedEntriesContent

Without the limit, this query is going to hangs forever on large
databases with millions of entries.
This commit is contained in:
Frédéric Guillot 2025-08-17 17:30:33 -07:00
parent 905d652511
commit 5403ca09f6
2 changed files with 13 additions and 6 deletions

View file

@ -54,7 +54,7 @@ func runCleanupTasks(store *storage.Storage) {
slog.Int64("removed_entries_enclosures_deleted", enclosuresAffected))
}
if contentAffected, err := store.ClearRemovedEntriesContent(); err != nil {
if contentAffected, err := store.ClearRemovedEntriesContent(config.Opts.CleanupArchiveBatchSize()); err != nil {
slog.Error("Unable to clear content from removed entries", slog.Any("error", err))
} else {
slog.Info("Clearing content from removed entries completed",