update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -9,8 +9,8 @@ import (
|
||||
"time"
|
||||
|
||||
"ezops/middleware"
|
||||
"ezops/pkg/wshub"
|
||||
ezredis "ezops/pkg/redis"
|
||||
"ezops/pkg/wshub"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
@@ -125,7 +125,7 @@ func (h *WSPipelineLogHandler) GetLogHistory(c *gin.Context) {
|
||||
// 先查 Redis(执行中)
|
||||
logKey := fmt.Sprintf("pipeline:run:%d:logs", uint(runID))
|
||||
ctx := c.Request.Context()
|
||||
|
||||
|
||||
raw, _ := h.cache.Get(ctx, logKey)
|
||||
if raw != "" && !strings.HasPrefix(raw, "[") {
|
||||
raw = "[]"
|
||||
@@ -137,7 +137,7 @@ func (h *WSPipelineLogHandler) GetLogHistory(c *gin.Context) {
|
||||
|
||||
// 查 DB(已完成)
|
||||
var logs string
|
||||
h.db.Table("ops_pipeline_runs").Where("id = ?", uint(runID)).Select("logs").Scan(&logs)
|
||||
h.db.Table("deploy_pipeline_runs").Where("id = ?", uint(runID)).Select("logs").Scan(&logs)
|
||||
if logs == "" {
|
||||
logs = "[]"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user