2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 16:23:59 +00:00

prune: trigger GC after prune planning

This commit is contained in:
Michael Eischer 2023-06-02 21:57:40 +02:00
parent eef0ee7a85
commit 2fcb3947df

View File

@ -3,6 +3,7 @@ package main
import (
"context"
"math"
"runtime"
"sort"
"strconv"
"strings"
@ -205,6 +206,9 @@ func runPruneWithRepo(ctx context.Context, opts PruneOptions, gopts GlobalOption
return err
}
// Trigger GC to reset garbage collection threshold
runtime.GC()
return doPrune(ctx, opts, gopts, repo, plan)
}