Redis库升级到V9

This commit is contained in:
Yun
2025-10-04 22:00:08 +08:00
parent 793a8da1af
commit 7ab9ac48c2
10 changed files with 27 additions and 43 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"sync"
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/yuninks/timerx/leader"
"github.com/yuninks/timerx/logger"
"github.com/yuninks/timerx/priority"
@@ -103,7 +103,7 @@ func (l *HeartBeat) heartbeatLoop() {
// 单次心跳
func (l *HeartBeat) heartbeat() error {
err := l.redis.ZAdd(l.ctx, l.heartbeatKey, &redis.Z{
err := l.redis.ZAdd(l.ctx, l.heartbeatKey, redis.Z{
Score: float64(time.Now().UnixMilli()),
Member: l.instanceId,
}).Err()