Skip to content

Commit c91f62a

Browse files
committed
PBM-1114: after review edits
1 parent 3fac1cc commit c91f62a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pbm/backup/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func (b *Backup) Run(ctx context.Context, bcp *ctrl.BackupCmd, opid ctrl.OPID, l
372372
return errors.Wrap(err, "check backup files")
373373
}
374374

375-
err = ChangeBackupStateWithUnix(b.leadConn, bcp.Name, defs.StatusDone, unix, "")
375+
err = ChangeBackupStateWithUnixTime(ctx, b.leadConn, bcp.Name, defs.StatusDone, unix, "")
376376
return errors.Wrapf(err, "check cluster for backup done: update backup meta with %s",
377377
defs.StatusDone)
378378
} else {

pbm/backup/query.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ func ChangeBackupState(conn connect.Client, bcpName string, s defs.Status, msg s
9090
conn, bson.D{{"name", bcpName}}, time.Now().UTC().Unix(), s, msg)
9191
}
9292

93-
func ChangeBackupStateWithUnix(
93+
func ChangeBackupStateWithUnixTime(
94+
ctx context.Context,
9495
conn connect.Client,
9596
bcpName string,
9697
s defs.Status,
9798
unix int64,
9899
msg string,
99100
) error {
100-
return changeBackupState(context.TODO(),
101-
conn, bson.D{{"name", bcpName}}, time.Now().UTC().Unix(), s, msg)
101+
return changeBackupState(ctx, conn, bson.D{{"name", bcpName}}, time.Now().UTC().Unix(), s, msg)
102102
}
103103

104104
func changeBackupState(

0 commit comments

Comments
 (0)