File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ module example
22
33go 1.16
44
5- require github.com/appleboy/queue v0.0.4-0.20210726090849-82cf3ebeafc5
5+ require github.com/appleboy/queue v0.0.4-0.20210730034730-99a80f7c71f6
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ github.com/appleboy/queue v0.0.4-0.20210726005953-79774a856a1e h1:+Mj8GY3F5J6rJC
66github.com/appleboy/queue v0.0.4-0.20210726005953-79774a856a1e /go.mod h1:6Mn0z4hURZW/26huvRXG0SJ4o7pBdo6hOryRiegy/4Q =
77github.com/appleboy/queue v0.0.4-0.20210726090849-82cf3ebeafc5 h1:UE6zMJQObLz/E/RcV3EMEXnU2wmeftvf9kNHozS5300 =
88github.com/appleboy/queue v0.0.4-0.20210726090849-82cf3ebeafc5 /go.mod h1:cEQW2y7dduAUqUGnGJEK9oM5bZLlc0+3HI9bTUL0+Ek =
9+ github.com/appleboy/queue v0.0.4-0.20210730034730-99a80f7c71f6 h1:IKX9oSPYXWXIvJ3aDqEM458S5gRsFUs9zzFND645te0 =
10+ github.com/appleboy/queue v0.0.4-0.20210730034730-99a80f7c71f6 /go.mod h1:cEQW2y7dduAUqUGnGJEK9oM5bZLlc0+3HI9bTUL0+Ek =
911github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8 =
1012github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
1113github.com/golang/protobuf v1.4.0-rc.1 /go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8 =
Original file line number Diff line number Diff line change 11package main
22
33import (
4+ "context"
45 "encoding/json"
56 "fmt"
67 "log"
@@ -33,7 +34,7 @@ func main() {
3334 nsq .WithChannel ("foobar" ),
3435 // concurrent job number
3536 nsq .WithMaxInFlight (10 ),
36- nsq .WithRunFunc (func (m queue. QueuedMessage , _ <- chan struct {} ) error {
37+ nsq .WithRunFunc (func (ctx context. Context , m queue. QueuedMessage ) error {
3738 v , ok := m .(* job )
3839 if ! ok {
3940 if err := json .Unmarshal (m .Bytes (), & v ); err != nil {
You can’t perform that action at this time.
0 commit comments