Skip to content

Commit 7d71fb0

Browse files
committed
always start backups with background context
#1072
1 parent 6e85d28 commit 7d71fb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/roles/backup/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ type APIBackupStartInput struct {
1919
func (r *Role) APIBackupStart() usecase.Interactor {
2020
u := usecase.NewInteractor(func(ctx context.Context, input APIBackupStartInput, output *BackupStatus) error {
2121
if input.Wait {
22-
o := r.SaveSnapshot(ctx)
22+
o := r.SaveSnapshot(context.Background())
2323
output.Duration = o.Duration
2424
output.Error = o.Error
2525
output.Filename = o.Filename
2626
output.Size = o.Size
2727
output.Status = o.Status
2828
} else {
29-
go r.SaveSnapshot(ctx)
29+
go r.SaveSnapshot(context.Background())
3030
output.Status = BackupStatusStarted
3131
}
3232
return nil

0 commit comments

Comments
 (0)