File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
require (
6
6
github.com/golang-queue/nsq v0.0.0-00010101000000-000000000000
7
- github.com/golang-queue/queue v0.0.12 -0.20220122071422-2c41650f045a
7
+ github.com/golang-queue/queue v0.0.13 -0.20220330060848-d1a0d31ce747
8
8
)
9
9
10
10
replace github.com/golang-queue/nsq => ../../
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ github.com/golang-queue/queue v0.0.8-0.20210905095503-cc99dff8fdc3 h1:ka4/BRgVnd
7
7
github.com/golang-queue/queue v0.0.8-0.20210905095503-cc99dff8fdc3 /go.mod h1:JS5tYJacahCjafcplU5idNLX2vkYioqh6wEDX5o9Nms =
8
8
github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a h1:olgbdu53u5A6Babr1w+CUO19UdZASYPPqqIBfdFWrWE =
9
9
github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a /go.mod h1:ku8iyjYffqYY6Duts+xl+QYfN3/KDK4MEvXMZUkHyio =
10
+ github.com/golang-queue/queue v0.0.13-0.20220330060848-d1a0d31ce747 h1:uNTbCoWORAcna89KcKgP22WFGv5fsij05e70DCnLrUU =
11
+ github.com/golang-queue/queue v0.0.13-0.20220330060848-d1a0d31ce747 /go.mod h1:ku8iyjYffqYY6Duts+xl+QYfN3/KDK4MEvXMZUkHyio =
10
12
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4 =
11
13
github.com/golang/snappy v0.0.1 /go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q =
12
14
github.com/kr/pretty v0.1.0 /go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo =
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ func main() {
30
30
nsq .WithAddr ("127.0.0.1:4150" ),
31
31
nsq .WithTopic ("example" ),
32
32
nsq .WithChannel ("foobar" ),
33
+ nsq .WithDisableConsumer (),
33
34
)
34
35
35
36
// define the queue
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ func TestHandleTimeout(t *testing.T) {
276
276
time .Sleep (200 * time .Millisecond )
277
277
return nil
278
278
}),
279
- withDisableConsumer (),
279
+ WithDisableConsumer (),
280
280
)
281
281
282
282
err := w .handle (job )
@@ -293,7 +293,7 @@ func TestHandleTimeout(t *testing.T) {
293
293
time .Sleep (200 * time .Millisecond )
294
294
return nil
295
295
}),
296
- withDisableConsumer (),
296
+ WithDisableConsumer (),
297
297
)
298
298
299
299
done := make (chan error )
@@ -317,7 +317,7 @@ func TestJobComplete(t *testing.T) {
317
317
WithRunFunc (func (ctx context.Context , m queue.QueuedMessage ) error {
318
318
return errors .New ("job completed" )
319
319
}),
320
- withDisableConsumer (),
320
+ WithDisableConsumer (),
321
321
)
322
322
323
323
err := w .handle (job )
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ func WithLogger(l queue.Logger) Option {
62
62
}
63
63
}
64
64
65
- func withDisableConsumer () Option {
65
+ // WithDisableConsumer disable consumer
66
+ func WithDisableConsumer () Option {
66
67
return func (w * options ) {
67
68
w .disableConsumer = true
68
69
}
You can’t perform that action at this time.
0 commit comments