prune: no longer disable automatic index updates

this allows prune to resume an interrupted prune run.
This commit is contained in:
Michael Eischer
2024-05-19 19:10:08 +02:00
parent 9aa0c90fb2
commit 68fa0e0305
3 changed files with 0 additions and 18 deletions

View File

@@ -42,8 +42,6 @@ type Repository struct {
opts Options
noAutoIndexUpdate bool
packerWg *errgroup.Group
uploader *packerUploader
treePM *packerManager
@@ -130,12 +128,6 @@ func New(be backend.Backend, opts Options) (*Repository, error) {
return repo, nil
}
// DisableAutoIndexUpdate deactives the automatic finalization and upload of new
// indexes once these are full
func (r *Repository) DisableAutoIndexUpdate() {
r.noAutoIndexUpdate = true
}
// setConfig assigns the given config and updates the repository parameters accordingly
func (r *Repository) setConfig(cfg restic.Config) {
r.cfg = cfg
@@ -526,10 +518,6 @@ func (r *Repository) Flush(ctx context.Context) error {
return err
}
// Save index after flushing only if noAutoIndexUpdate is not set
if r.noAutoIndexUpdate {
return nil
}
return r.idx.SaveIndex(ctx, r)
}