mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-05-04 03:50:30 +00:00
fix: condition snapshot start hook may not run if repo is unreachable and autounlock is enabled
This commit is contained in:
@@ -142,10 +142,6 @@ func (t *BackupTask) Run(ctx context.Context, st ScheduledTask, runner TaskRunne
|
||||
return notifyError(err)
|
||||
}
|
||||
|
||||
if err := repo.UnlockIfAutoEnabled(ctx); err != nil {
|
||||
return notifyError(fmt.Errorf("auto unlock repo %q: %w", t.RepoID(), err))
|
||||
}
|
||||
|
||||
plan, err := runner.GetPlan(t.PlanID())
|
||||
if err != nil {
|
||||
return notifyError(err)
|
||||
@@ -157,6 +153,10 @@ func (t *BackupTask) Run(ctx context.Context, st ScheduledTask, runner TaskRunne
|
||||
return notifyError(fmt.Errorf("snapshot start hook: %w", err))
|
||||
}
|
||||
|
||||
if err := repo.UnlockIfAutoEnabled(ctx); err != nil {
|
||||
return notifyError(fmt.Errorf("auto unlock repo %q: %w", t.RepoID(), err))
|
||||
}
|
||||
|
||||
var sendWg sync.WaitGroup
|
||||
lastSent := time.Now() // debounce progress updates, these can endup being very frequent.
|
||||
var lastFiles []string
|
||||
|
||||
Reference in New Issue
Block a user