Skip to content

Commit

Permalink
fix(rdb): fix argument parsing in backup wait (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored Sep 14, 2020
1 parent 8002bf3 commit ffe3da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

EXAMPLES:
Wait for a backup to reach a stable state
scw rdb backup wait
scw rdb backup wait 11111111-1111-1111-1111-111111111111

ARGS:
backup-id ID of the backup you want to wait for.
Expand Down
6 changes: 3 additions & 3 deletions internal/namespaces/rdb/v1/custom_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ var (
)

type backupWaitRequest struct {
DatabaseBackupID string
Region scw.Region
BackupID string
Region scw.Region
}

func backupWaitCommand() *core.Command {
Expand All @@ -50,7 +50,7 @@ func backupWaitCommand() *core.Command {
Run: func(ctx context.Context, argsI interface{}) (i interface{}, err error) {
api := rdb.NewAPI(core.ExtractClient(ctx))
return api.WaitForDatabaseBackup(&rdb.WaitForDatabaseBackupRequest{
DatabaseBackupID: argsI.(*backupWaitRequest).DatabaseBackupID,
DatabaseBackupID: argsI.(*backupWaitRequest).BackupID,
Region: argsI.(*backupWaitRequest).Region,
Timeout: scw.TimeDurationPtr(backupActionTimeout),
RetryInterval: core.DefaultRetryInterval,
Expand Down

0 comments on commit ffe3da2

Please sign in to comment.