Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.4.1^2
zouap 3 years ago
parent
commit
da3876672f
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      routers/repo/cloudbrain.go

+ 2
- 0
routers/repo/cloudbrain.go View File

@@ -438,7 +438,9 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo
if cloudbrain.ResourceSpecs == nil {
json.Unmarshal([]byte(setting.ResourceSpecs), &cloudbrain.ResourceSpecs)
}

for _, tmp := range cloudbrain.ResourceSpecs.ResourceSpec {
log.Info("tmp.id=" + fmt.Sprint(tmp.Id) + " task.ResourceSpecId=" + fmt.Sprint(task.ResourceSpecId))
if tmp.Id == task.ResourceSpecId {
ctx.Data["GpuNum"] = tmp.GpuNum
ctx.Data["CpuNum"] = tmp.CpuNum


Loading…
Cancel
Save