Skip to content

Commit

Permalink
always start backups with background context
Browse files Browse the repository at this point in the history
  • Loading branch information
BeryJu committed Jun 18, 2024
1 parent 6e85d28 commit 7d71fb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/roles/backup/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ type APIBackupStartInput struct {
func (r *Role) APIBackupStart() usecase.Interactor {
u := usecase.NewInteractor(func(ctx context.Context, input APIBackupStartInput, output *BackupStatus) error {
if input.Wait {
o := r.SaveSnapshot(ctx)
o := r.SaveSnapshot(context.Background())
output.Duration = o.Duration
output.Error = o.Error
output.Filename = o.Filename
output.Size = o.Size
output.Status = o.Status
} else {
go r.SaveSnapshot(ctx)
go r.SaveSnapshot(context.Background())
output.Status = BackupStatusStarted
}
return nil
Expand Down

0 comments on commit 7d71fb0

Please sign in to comment.