2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-21 21:46:12 +08:00

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 e99a4307a1
4 changed files with 11 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import (
"testing"
"time"
"github.com/go-redis/redis/v7"
"go.uber.org/goleak"
)
@@ -17,10 +18,11 @@ func TestBackground(t *testing.T) {
DB: 15,
})
client := NewClient(&RedisConfig{
r := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
DB: 15,
})
client := NewClient(r)
// no-op handler
h := func(task *Task) error {