Private
Public Access
1
0

重构:文件系统模块化架构,优化应用启动流程

This commit is contained in:
2026-01-28 00:28:54 +08:00
parent 4a9b25a505
commit 8c577f70e7
123 changed files with 32030 additions and 967 deletions

View File

@@ -5,6 +5,8 @@ import (
"fmt"
"time"
"go-desk/internal/common"
"github.com/redis/go-redis/v9"
)
@@ -30,13 +32,13 @@ func NewRedisClient(config *RedisConfig) (*RedisClient, error) {
Addr: addr,
Password: config.Password,
DB: config.DB,
DialTimeout: 5 * time.Second,
DialTimeout: common.TimeoutConnect,
ReadTimeout: 3 * time.Second,
WriteTimeout: 3 * time.Second,
})
// 测试连接
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), common.TimeoutConnect)
defer cancel()
if err := rdb.Ping(ctx).Err(); err != nil {