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

Change NewBackground API to take *redis.Client

This commit is contained in:
Ken Hibino
2019-12-29 14:50:46 -08:00
parent e99a4307a1
commit f765045171
4 changed files with 18 additions and 37 deletions

View File

@@ -13,16 +13,12 @@ func TestBackground(t *testing.T) {
ignoreOpt := goleak.IgnoreTopFunction("github.com/go-redis/redis/v7/internal/pool.(*ConnPool).reaper")
defer goleak.VerifyNoLeaks(t, ignoreOpt)
bg := NewBackground(10, &RedisConfig{
Addr: "localhost:6379",
DB: 15,
})
r := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
DB: 15,
})
client := NewClient(r)
bg := NewBackground(r, 10)
// no-op handler
h := func(task *Task) error {