Browse Source

fix-2859

pull/2867/head
liuzx 2 years ago
parent
commit
cb3d7947b9
3 changed files with 10 additions and 0 deletions
  1. +4
    -0
      routers/repo/cloudbrain.go
  2. +2
    -0
      routers/repo/grampus.go
  3. +4
    -0
      routers/repo/modelarts.go

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

@@ -253,6 +253,7 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("The task have been processed, please wait a minute", tpl, &form)
return
}
@@ -440,6 +441,7 @@ func CloudBrainInferenceJobCreate(ctx *context.Context, form auth.CreateCloudBra
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("The task have been processed, please wait a minute", tpl, &form)
return
}
@@ -2320,6 +2322,7 @@ func BenchMarkAlgorithmCreate(ctx *context.Context, form auth.CreateCloudBrainFo
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplCloudBrainBenchmarkNew, &form)
return
}
@@ -2516,6 +2519,7 @@ func ModelBenchmarkCreate(ctx *context.Context, form auth.CreateCloudBrainForm)
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
cloudBrainNewDataPrepare(ctx)
ctx.RenderWithErr("The task have been processed, please wait a minute", tpl, &form)
return
}


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

@@ -215,6 +215,7 @@ func GrampusTrainJobGpuCreate(ctx *context.Context, form auth.CreateGrampusTrain
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeGPU)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplGrampusTrainJobGPUNew, &form)
return
}
@@ -416,6 +417,7 @@ func GrampusTrainJobNpuCreate(ctx *context.Context, form auth.CreateGrampusTrain
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
grampusTrainJobNewDataPrepare(ctx, grampus.ProcessorTypeNPU)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplGrampusTrainJobNPUNew, &form)
return
}


+ 4
- 0
routers/repo/modelarts.go View File

@@ -214,6 +214,7 @@ func Notebook2Create(ctx *context.Context, form auth.CreateModelArtsNotebookForm
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
notebookNewDataPrepare(ctx)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplModelArtsNotebookNew, &form)
return
}
@@ -1130,6 +1131,7 @@ func TrainJobCreate(ctx *context.Context, form auth.CreateModelArtsTrainJobForm)
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
trainJobErrorNewDataPrepare(ctx, form)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplModelArtsTrainJobIndex, &form)
return
}
@@ -1452,6 +1454,7 @@ func TrainJobCreateVersion(ctx *context.Context, form auth.CreateModelArtsTrainJ
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
versionErrorDataPrepare(ctx, form)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplModelArtsTrainJobVersionNew, &form)
return
}
@@ -2054,6 +2057,7 @@ func InferenceJobCreate(ctx *context.Context, form auth.CreateModelArtsInference
isOk := lock.Lock(60 * time.Second)
if !isOk {
log.Error("The task have been processed", ctx.Data["MsgID"])
inferenceJobErrorNewDataPrepare(ctx, form)
ctx.RenderWithErr("The task have been processed, please wait a minute", tplModelArtsInferenceJobNew, &form)
return
}


Loading…
Cancel
Save