Change NewClient API to take *redis.Client

This commit is contained in:
Ken Hibino
2019-12-29 13:42:49 -08:00
parent ae0c2f9ca5
commit 62624cb0d8
4 changed files with 11 additions and 8 deletions

View File

@@ -50,9 +50,10 @@ import "github.com/hibiken/asynq"
```go
func main() {
client := asynq.NewClient(&asynq.RedisOpt{
r := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
})
}
client := asynq.NewClient(r)
t1 := asynq.Task{
Type: "send_welcome_email",