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 44
55require (
66 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
88)
99
1010replace 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
77github.com/golang-queue/queue v0.0.8-0.20210905095503-cc99dff8fdc3 /go.mod h1:JS5tYJacahCjafcplU5idNLX2vkYioqh6wEDX5o9Nms =
88github.com/golang-queue/queue v0.0.12-0.20220122071422-2c41650f045a h1:olgbdu53u5A6Babr1w+CUO19UdZASYPPqqIBfdFWrWE =
99github.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 =
1012github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4 =
1113github.com/golang/snappy v0.0.1 /go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q =
1214github.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() {
3030 nsq .WithAddr ("127.0.0.1:4150" ),
3131 nsq .WithTopic ("example" ),
3232 nsq .WithChannel ("foobar" ),
33+ nsq .WithDisableConsumer (),
3334 )
3435
3536 // define the queue
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ func TestHandleTimeout(t *testing.T) {
276276 time .Sleep (200 * time .Millisecond )
277277 return nil
278278 }),
279- withDisableConsumer (),
279+ WithDisableConsumer (),
280280 )
281281
282282 err := w .handle (job )
@@ -293,7 +293,7 @@ func TestHandleTimeout(t *testing.T) {
293293 time .Sleep (200 * time .Millisecond )
294294 return nil
295295 }),
296- withDisableConsumer (),
296+ WithDisableConsumer (),
297297 )
298298
299299 done := make (chan error )
@@ -317,7 +317,7 @@ func TestJobComplete(t *testing.T) {
317317 WithRunFunc (func (ctx context.Context , m queue.QueuedMessage ) error {
318318 return errors .New ("job completed" )
319319 }),
320- withDisableConsumer (),
320+ WithDisableConsumer (),
321321 )
322322
323323 err := w .handle (job )
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ func WithLogger(l queue.Logger) Option {
6262 }
6363}
6464
65- func withDisableConsumer () Option {
65+ // WithDisableConsumer disable consumer
66+ func WithDisableConsumer () Option {
6667 return func (w * options ) {
6768 w .disableConsumer = true
6869 }
You can’t perform that action at this time.
0 commit comments