mirror of
https://github.com/restic/restic.git
synced 2026-11-02 13:35:33 +00:00
prune: trigger GC after prune planning
This commit is contained in:
1 parent
eef0ee7a85
commit
2fcb3947df
1 file changed
+4
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user