Browse Source

fix-3262

tags/v1.22.12.2^2
Gitea 2 years ago
parent
commit
3a26a12a53
3 changed files with 13 additions and 3 deletions
  1. +2
    -0
      models/cloudbrain.go
  2. +1
    -0
      modules/setting/setting.go
  3. +10
    -3
      routers/repo/cloudbrain.go

+ 2
- 0
models/cloudbrain.go View File

@@ -2424,6 +2424,7 @@ type DatasetInfo struct {
DataLocalPath string
Name string
FullName string
Size int64
}

func GetDatasetInfo(uuidStr string, grampusType ...string) (map[string]DatasetInfo, string, error) {
@@ -2479,6 +2480,7 @@ func GetDatasetInfo(uuidStr string, grampusType ...string) (map[string]DatasetIn
DataLocalPath: dataLocalPath,
Name: fileName,
FullName: attach.Name,
Size: attach.Size,
}
if i == 0 {
datasetNames = attach.Name


+ 1
- 0
modules/setting/setting.go View File

@@ -518,6 +518,7 @@ var (
MaxDatasetNum int
CullIdleTimeout string
CullInterval string
DebugDatasetSize int64

//benchmark config
IsBenchmarkEnabled bool


+ 10
- 3
routers/repo/cloudbrain.go View File

@@ -293,6 +293,13 @@ func cloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) {
ctx.RenderWithErr(ctx.Tr("cloudbrain.error.dataset_select"), tpl, &form)
return
}

if jobType == string(models.JobTypeDebug) {
for _, infos := range datasetInfos {
log.Info("the size of dataset", infos.Size)
}

}
}

command := cloudbrain.GetCloudbrainDebugCommand()
@@ -842,10 +849,10 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo
func CloudBrainDebug(ctx *context.Context) {
task := ctx.Cloudbrain
debugUrl := setting.DebugServerHost + "jpylab_" + task.JobID + "_" + task.SubTaskName
if task.BootFile!=""{
ctx.Redirect(getFileUrl(debugUrl,task.BootFile))
if task.BootFile != "" {
ctx.Redirect(getFileUrl(debugUrl, task.BootFile))

}else{
} else {
ctx.Redirect(debugUrl)
}



Loading…
Cancel
Save