feat: update go-redis to v8, support ctx in redis methods (#1507)

* feat: update go-redis to v8, support ctx in redis methods

* fix compile errors

* chore: remove unused const

* chore: add tracing log on redis
This commit is contained in:
Kevin Wan
2022-02-09 11:06:06 +08:00
committed by GitHub
parent 77482c8946
commit 822ee2e1c5
15 changed files with 980 additions and 264 deletions

View File

@@ -17,10 +17,12 @@ func CreateRedis() (r *redis.Redis, clean func(), err error) {
return redis.New(mr.Addr()), func() {
ch := make(chan lang.PlaceholderType)
go func() {
mr.Close()
close(ch)
}()
select {
case <-ch:
case <-time.After(time.Second):