Skip to content

Commit

Permalink
fix: pruning repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Adis Durakovic committed Mar 19, 2024
1 parent 625499e commit dba24a5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions internal/restic.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,23 @@ func (r *Restic) RunSchedule(
*toRepository,
[]string{"unlock"},
[]string{},
job,
nil,
nil,
)
if err == nil {
_, err := r.core(*toRepository, cmds, []string{}, job, nil)
if err != nil {
log.Error("prune-repository", "err", err)
return err
}
log.Debug("unlocking repository")
if err != nil {
log.Error("unlocking repository", "err", err)
return err
}
_, err = r.core(*toRepository, cmds, []string{}, job, nil)
if err != nil {
log.Error("prune-repository", "err", err)
return err
}

break
}

(*r.OutputCh) <- ChanMsg{Id: job.Schedule.Id, Msg: "{\"running\": false}", Time: time.Now()}
return nil

}

0 comments on commit dba24a5

Please sign in to comment.