Skip to content

Commit

Permalink
Fix exhexpire command seconds args
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbodong22011 committed Nov 24, 2023
1 parent 05020d0 commit ad014f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tair/taircommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ type TairCmdable interface {
ExHMSet(ctx context.Context, key string, fieldValue map[string]string) *redis.StatusCmd
ExHMSetWithOpts(ctx context.Context, key string, arg ...*ExHMSetWithOptsArgs) *redis.StatusCmd
ExHPExpire(ctx context.Context, key, field string, milliseconds int) *redis.BoolCmd
ExHPExpireAt(ctx context.Context, key, field string, unixTime int) *redis.BoolCmd
ExHExpire(ctx context.Context, key, field string, milliseconds int) *redis.BoolCmd
ExHPExpireAt(ctx context.Context, key, field string, milliUnixTime int) *redis.BoolCmd
ExHExpire(ctx context.Context, key, field string, seconds int) *redis.BoolCmd
ExHExpireAt(ctx context.Context, key, field string, unixTime int) *redis.BoolCmd
ExHPTTL(ctx context.Context, key, field string) *redis.IntCmd
ExHTTL(ctx context.Context, key, field string) *redis.IntCmd
Expand Down
8 changes: 4 additions & 4 deletions tair/tairhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,23 +336,23 @@ func (tc tairCmdable) ExHPExpire(ctx context.Context, key, field string, millise
return cmd
}

func (tc tairCmdable) ExHPExpireAt(ctx context.Context, key, field string, unixTime int) *redis.BoolCmd {
func (tc tairCmdable) ExHPExpireAt(ctx context.Context, key, field string, milliUnixTime int) *redis.BoolCmd {
a := make([]interface{}, 4)
a[0] = "exhpexpireat"
a[1] = key
a[2] = field
a[3] = unixTime
a[3] = milliUnixTime
cmd := redis.NewBoolCmd(ctx, a...)
_ = tc(ctx, cmd)
return cmd
}

func (tc tairCmdable) ExHExpire(ctx context.Context, key, field string, milliseconds int) *redis.BoolCmd {
func (tc tairCmdable) ExHExpire(ctx context.Context, key, field string, seconds int) *redis.BoolCmd {
a := make([]interface{}, 4)
a[0] = "exhexpire"
a[1] = key
a[2] = field
a[3] = milliseconds
a[3] = seconds
cmd := redis.NewBoolCmd(ctx, a...)
_ = tc(ctx, cmd)
return cmd
Expand Down

0 comments on commit ad014f0

Please sign in to comment.