From c12105d60f68780a3c1b79390e8d3fa504d04a08 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Wed, 30 Nov 2022 16:15:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/cloudbrain/cloudbrain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/cloudbrain/cloudbrain.go b/modules/cloudbrain/cloudbrain.go index f8a6525d2..6111cf460 100755 --- a/modules/cloudbrain/cloudbrain.go +++ b/modules/cloudbrain/cloudbrain.go @@ -661,6 +661,9 @@ func GetCloudBrainByIdOrJobId(id string) (*models.Cloudbrain,error) { job, err = models.GetCloudbrainByJobID(id) } else { job, err = models.GetCloudbrainByID(id) + if err!=nil{ + job, err = models.GetCloudbrainByJobID(id) + } } return job,err From 8830ed213853a206443878abced03cc7bc2dca92 Mon Sep 17 00:00:00 2001 From: liuzx Date: Wed, 30 Nov 2022 16:59:15 +0800 Subject: [PATCH 2/2] rm log --- routers/repo/cloudbrain_statistic.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/routers/repo/cloudbrain_statistic.go b/routers/repo/cloudbrain_statistic.go index 2c63ea70c..880ff7b8a 100644 --- a/routers/repo/cloudbrain_statistic.go +++ b/routers/repo/cloudbrain_statistic.go @@ -1,7 +1,6 @@ package repo import ( - "fmt" "net/http" "strings" "time" @@ -69,7 +68,6 @@ func summaryDurationStat(statisticTime time.Time) int64 { log.Info("GetCloudbrainByTime err: %v", err) return 0 } - fmt.Printf("ciTasks:", ciTasks[0].Cloudbrain.JobName) models.LoadSpecs4CloudbrainInfo(ciTasks) cloudBrainCenterCodeAndCardTypeInfo, cloudbrainMap := getcloudBrainCenterCodeAndCardTypeInfo(ciTasks, beginTime, endTime)