fix: 修复日志输出与代码格式错误
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-25 01:22:44 +08:00
committed by cnb
parent e0a82d57b4
commit f8b8a87331
13 changed files with 146 additions and 54 deletions

View File

@@ -42,7 +42,6 @@ func ListenFunc(ctx g.Ctx) {
time.Sleep(retryDelay)
continue
}
cool.Logger.Info(ctx, "成功获取 Redis 连接")
// 2. 启动心跳保活协程,防止连接因空闲被断开
heartbeatCtx, heartbeatCancel := context.WithCancel(context.Background())
@@ -67,7 +66,7 @@ func ListenFunc(ctx g.Ctx) {
_ = conn.Close(ctx)
return
}
cool.Logger.Debug(ctx, "Redis 心跳发送成功,连接正常")
}
}
}()
@@ -170,7 +169,6 @@ func ListenFight(ctx g.Ctx) {
time.Sleep(retryDelay)
continue
}
cool.Logger.Info(ctx, "成功获取 Redis 连接")
// 2. 启动心跳保活协程(完全对齐 ListenFunc 逻辑)
heartbeatCtx, heartbeatCancel := context.WithCancel(context.Background())