File tree 6 files changed +14
-13
lines changed
6 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 7
7
"sync"
8
8
"time"
9
9
10
- "github.com/go-redis/redis/v8 "
10
+ "github.com/go-redis/redis/v9 "
11
11
"github.com/pkg/errors"
12
12
)
13
13
Original file line number Diff line number Diff line change 6
6
"testing"
7
7
"time"
8
8
9
- "github.com/go-redis/redis/v8 "
9
+ "github.com/go-redis/redis/v9 "
10
10
"github.com/pkg/errors"
11
11
"github.com/stretchr/testify/assert"
12
12
"github.com/stretchr/testify/require"
Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ go 1.12
5
5
require (
6
6
github.com/fatih/color v1.7.0 // indirect
7
7
github.com/git-chglog/git-chglog v0.0.0-20190611050339-63a4e637021f
8
- github.com/go-redis/redis/v8 v8.11.5
8
+ github.com/go-redis/redis/v9 v9.0.0-rc.1
9
9
github.com/imdario/mergo v0.3.7 // indirect
10
10
github.com/mattn/go-colorable v0.1.2 // indirect
11
11
github.com/mattn/goveralls v0.0.2
12
12
github.com/pborman/uuid v1.2.0 // indirect
13
13
github.com/pkg/errors v0.9.1
14
- github.com/stretchr/testify v1.5.1
14
+ github.com/stretchr/testify v1.8.0
15
15
github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df // indirect
16
16
github.com/urfave/cli v1.20.0 // indirect
17
17
gopkg.in/AlecAivazis/survey.v1 v1.8.5 // indirect
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package redisqueue
2
2
3
3
import (
4
4
"context"
5
- "github.com/go-redis/redis/v8 "
5
+ "github.com/go-redis/redis/v9 "
6
6
)
7
7
8
8
// ProducerOptions provide options to configure the Producer.
@@ -81,11 +81,11 @@ func (p *Producer) Enqueue(msg *Message) error {
81
81
Stream : msg .Stream ,
82
82
Values : msg .Values ,
83
83
}
84
- if p .options .ApproximateMaxLength {
85
- args .MaxLenApprox = p .options .StreamMaxLength
86
- } else {
87
- args .MaxLen = p .options .StreamMaxLength
88
- }
84
+ // if p.options.ApproximateMaxLength {
85
+ // args.MaxLenApprox = p.options.StreamMaxLength
86
+ // } else {
87
+ args .MaxLen = p .options .StreamMaxLength
88
+ // }
89
89
id , err := p .redis .XAdd (context .TODO (), args ).Result ()
90
90
if err != nil {
91
91
return err
Original file line number Diff line number Diff line change 7
7
"strconv"
8
8
"strings"
9
9
10
- "github.com/go-redis/redis/v8 "
10
+ "github.com/go-redis/redis/v9 "
11
11
"github.com/pkg/errors"
12
12
)
13
13
Original file line number Diff line number Diff line change 1
1
package redisqueue
2
2
3
3
import (
4
+ "context"
4
5
"testing"
5
6
6
7
"github.com/stretchr/testify/assert"
@@ -12,14 +13,14 @@ func TestNewRedisClient(t *testing.T) {
12
13
options := & RedisOptions {}
13
14
r := newRedisClient (options )
14
15
15
- err := r .Ping ().Err ()
16
+ err := r .Ping (context . TODO () ).Err ()
16
17
assert .NoError (tt , err )
17
18
})
18
19
19
20
t .Run ("defaults options if it's nil" , func (tt * testing.T ) {
20
21
r := newRedisClient (nil )
21
22
22
- err := r .Ping ().Err ()
23
+ err := r .Ping (context . TODO () ).Err ()
23
24
assert .NoError (tt , err )
24
25
})
25
26
}
You can’t perform that action at this time.
0 commit comments