Skip to content

Commit 0c29c70

Browse files
committed
chore: update redigo dependency
1 parent 233ea99 commit 0c29c70

File tree

3 files changed

+17
-28
lines changed

3 files changed

+17
-28
lines changed

README.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ Machinery is an asynchronous task queue/job queue based on distributed message p
5757
* [Dependencies](#dependencies)
5858
* [Testing](#testing)
5959

60-
### V2 Experiment
60+
### V2
6161

62-
Please be advised that V2 is work in progress and breaking changes can and will happen until it is ready.
63-
64-
You can use the current V2 in order to avoid having to import all dependencies for brokers and backends you are not using.
62+
I recommend using V2 in order to avoid having to import all dependencies for brokers and backends you are not using.
6563

6664
Instead of factory, you will need to inject broker and backend objects to the server constructor:
6765

@@ -82,32 +80,22 @@ server := machinery.NewServer(cnf, broker, backend, lock)
8280

8381
### First Steps
8482

85-
Add the Machinery library to your $GOPATH/src:
83+
To install recommended v2 release:
8684

8785
```sh
88-
go get github.com/RichardKnop/machinery/v1
86+
go get github.com/RichardKnop/machinery/v2
8987
```
9088

91-
Or to get experimental v2 release:
89+
If you want to use legacy v1 version, you still can:
9290

9391
```sh
94-
go get github.com/RichardKnop/machinery/v2
92+
go get github.com/RichardKnop/machinery
9593
```
9694

97-
First, you will need to define some tasks. Look at sample tasks in `example/tasks/tasks.go` to see a few examples.
95+
First, you will need to define some tasks. Look at sample tasks in `v2/example/tasks/tasks.go` to see a few examples.
9896

9997
Second, you will need to launch a worker process with one of these commands (v2 is recommended since it doesn't import dependencies for all brokers / backends, only those you actually need):
10098

101-
```sh
102-
go run example/amqp/main.go worker
103-
go run example/redis/main.go worker
104-
105-
go run example/amqp/main.go worker
106-
go run example/redis/main.go worker
107-
```
108-
109-
You can also try v2 examples.
110-
11199
```sh
112100
cd v2/
113101
go run example/amqp/main.go worker
@@ -123,12 +111,10 @@ go run example/redis/main.go worker
123111
Finally, once you have a worker running and waiting for tasks to consume, send some tasks with one of these commands (v2 is recommended since it doesn't import dependencies for all brokers / backends, only those you actually need):
124112

125113
```sh
126-
go run example/v2/amqp/main.go send
127-
go run example/v2/redigo/main.go send // Redis with redigo driver
128-
go run example/v2/go-redis/main.go send // Redis with Go Redis driver
129-
130-
go run example/v1/amqp/main.go send
131-
go run example/v1/redis/main.go send
114+
cd v2
115+
go run v2/example/amqp/main.go send
116+
go run v2/example/redigo/main.go send // Redis with redigo driver
117+
go run v2/example/go-redis/main.go send // Redis with Go Redis driver
132118
```
133119

134120
You will be able to see the tasks being processed asynchronously by the worker:
@@ -137,7 +123,7 @@ You will be able to see the tasks being processed asynchronously by the worker:
137123

138124
### Configuration
139125

140-
The [config](/v1/config/config.go) package has convenience methods for loading configuration from environment variables or a YAML file. For example, load configuration from environment variables:
126+
The [config](/v2/config/config.go) package has convenience methods for loading configuration from environment variables or a YAML file. For example, load configuration from environment variables:
141127

142128
```go
143129
cnf, err := config.NewFromEnvironment()

v2/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ require (
88
github.com/aws/aws-sdk-go v1.37.16
99
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
1010
github.com/go-redsync/redsync/v4 v4.8.1
11-
github.com/gomodule/redigo v2.0.0+incompatible
11+
github.com/gomodule/redigo v1.9.2
1212
github.com/google/uuid v1.2.0
1313
github.com/kelseyhightower/envconfig v1.4.0
1414
github.com/opentracing/opentracing-go v1.2.0
1515
github.com/pkg/errors v0.9.1
1616
github.com/rabbitmq/amqp091-go v1.9.0
1717
github.com/redis/go-redis/v9 v9.0.5
1818
github.com/robfig/cron/v3 v3.0.1
19-
github.com/stretchr/testify v1.8.1
19+
github.com/stretchr/testify v1.8.4
2020
github.com/urfave/cli v1.22.5
2121
go.mongodb.org/mongo-driver v1.4.6
2222
gopkg.in/yaml.v2 v2.4.0

v2/go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
150150
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
151151
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
152152
github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
153+
github.com/gomodule/redigo v1.9.2 h1:HrutZBLhSIU8abiSfW8pj8mPhOyMYjZT/wcA4/L9L9s=
154+
github.com/gomodule/redigo v1.9.2/go.mod h1:KsU3hiK/Ay8U42qpaJk+kuNa3C+spxapWpM+ywhcgtw=
153155
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
154156
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
155157
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -277,6 +279,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
277279
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
278280
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
279281
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
282+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
280283
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203 h1:QVqDTf3h2WHt08YuiTGPZLls0Wq99X9bWd0Q5ZSBesM=
281284
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203/go.mod h1:oqN97ltKNihBbwlX8dLpwxCl3+HnXKV/R0e+sRLd9C8=
282285
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=

0 commit comments

Comments
 (0)