调度中心嵌入cms

This commit is contained in:
vet
2026-05-28 13:29:24 +08:00
parent 52446ccf3f
commit 5f93d025d2
17 changed files with 262 additions and 20 deletions

View File

@@ -6,9 +6,10 @@ import (
"github.com/redis/go-redis/v9"
)
func newRedisClient(ctx context.Context, addr, password string) (*redis.Client, error) {
func newRedisClient(ctx context.Context, addr, username, password string) (*redis.Client, error) {
rdb := redis.NewClient(&redis.Options{
Addr: addr,
Username: username,
Password: password,
})
if err := rdb.Ping(ctx).Err(); err != nil {