summaryrefslogtreecommitdiffstats
path: root/modules/nosql
diff options
context:
space:
mode:
authorPatrick Schratz <patrick.schratz@gmail.com>2023-04-17 08:34:59 +0200
committerGitHub <noreply@github.com>2023-04-17 02:34:59 -0400
commit463e144d97d4ffa913658076bee0ed2781ea2735 (patch)
tree13f210559c0b1fc1872a211803d7ddaf3b0e33de /modules/nosql
parent2b32f8b95f13aac07a27449290ac4ca5d9a917f0 (diff)
downloadgitea-463e144d97d4ffa913658076bee0ed2781ea2735.tar.gz
gitea-463e144d97d4ffa913658076bee0ed2781ea2735.zip
Update redis library to support redis v7 (#24114) (#24156)
backports #24114 --------- Co-authored-by: techknowlogick <hello@techknowlogick.com>
Diffstat (limited to 'modules/nosql')
-rw-r--r--modules/nosql/manager.go2
-rw-r--r--modules/nosql/manager_redis.go6
2 files changed, 2 insertions, 6 deletions
diff --git a/modules/nosql/manager.go b/modules/nosql/manager.go
index bc530bc148..31e43297dc 100644
--- a/modules/nosql/manager.go
+++ b/modules/nosql/manager.go
@@ -11,7 +11,7 @@ import (
"code.gitea.io/gitea/modules/process"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
"github.com/syndtr/goleveldb/leveldb"
)
diff --git a/modules/nosql/manager_redis.go b/modules/nosql/manager_redis.go
index 728bc2f2ef..7066863b89 100644
--- a/modules/nosql/manager_redis.go
+++ b/modules/nosql/manager_redis.go
@@ -13,7 +13,7 @@ import (
"code.gitea.io/gitea/modules/log"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
var replacer = strings.NewReplacer("_", "", "-", "")
@@ -193,10 +193,6 @@ func getRedisOptions(uri *url.URL) *redis.UniversalOptions {
opts.MinIdleConns, _ = strconv.Atoi(v[0])
case "pooltimeout":
opts.PoolTimeout = valToTimeDuration(v)
- case "idletimeout":
- opts.IdleTimeout = valToTimeDuration(v)
- case "idlecheckfrequency":
- opts.IdleCheckFrequency = valToTimeDuration(v)
case "maxredirects":
opts.MaxRedirects, _ = strconv.Atoi(v[0])
case "readonly":