Skip to content

Commit

Permalink
Increase timeout to 5m
Browse files Browse the repository at this point in the history
  • Loading branch information
yannh committed Apr 16, 2021
1 parent 82d1303 commit d91e223
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion redisdump/redisdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,14 @@ func DumpDB(redisHost string, redisPort int, redisPassword string, db uint8, fil
}()

redisURL := RedisURL(redisHost, fmt.Sprint(redisPort), fmt.Sprint(db), redisPassword)
client, err := radix.NewPool("tcp", redisURL, nWorkers)

customConnFunc := func(network, addr string) (radix.Conn, error) {
return radix.Dial(network, addr,
radix.DialTimeout(5 * time.Minute),
)
}

client, err := radix.NewPool("tcp", redisURL, nWorkers, radix.PoolConnFunc(customConnFunc))
if err != nil {
return err
}
Expand Down

0 comments on commit d91e223

Please sign in to comment.