Browse Source

debug

opt-modelarts
lewis 3 years ago
parent
commit
26630a0a9c
2 changed files with 7 additions and 14 deletions
  1. +6
    -7
      models/cloudbrain_temp.go
  2. +1
    -7
      modules/modelarts/modelarts.go

+ 6
- 7
models/cloudbrain_temp.go View File

@@ -16,13 +16,12 @@ type CloudbrainTemp struct {
CloudbrainID int64 `xorm:"pk"`
JobName string
Type int
JobType string `xorm:"INDEX NOT NULL DEFAULT 'DEBUG'"`
Status string `xorm:"INDEX NOT NULL DEFAULT 'TEMP'"`
//VersionCount int `xorm:"NOT NULL DEFAULT 0"`
QueryTimes int `xorm:"INDEX NOT NULL DEFAULT 0"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
DeletedAt time.Time `xorm:"deleted"`
JobType string `xorm:"INDEX NOT NULL DEFAULT 'DEBUG'"`
Status string `xorm:"INDEX NOT NULL DEFAULT 'TEMP'"`
QueryTimes int `xorm:"INDEX NOT NULL DEFAULT 0"`
CreatedUnix timeutil.TimeStamp `xorm:"INDEX"`
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
DeletedAt time.Time `xorm:"deleted"`
}

func InsertCloudbrainTemp(temp *CloudbrainTemp) (err error) {


+ 1
- 7
modules/modelarts/modelarts.go View File

@@ -1052,6 +1052,7 @@ func SyncTempStatusJob() {
}

for _, temp := range jobs {
log.Info("start to handle record: %s", temp.JobName)
task, err := models.GetCloudbrainByID(strconv.FormatInt(temp.CloudbrainID, 10))
if err != nil {
log.Error("GetCloudbrainByID failed:%v", err)
@@ -1137,11 +1138,7 @@ func SyncTempStatusJob() {
log.Error("DeleteCloudbrainTemp(%s) failed:%v", task.DisplayJobName, err)
continue
}
} else {
log.Error("can not find the record(%s) until now", task.DisplayJobName)
}
} else {
log.Error("can not find the record(%s) until now", task.DisplayJobName)
}
}
} else {
@@ -1181,9 +1178,6 @@ func SyncTempStatusJob() {

}
}
} else {
log.Error("invalid job_type(%d)", temp.Type)
continue
}
}



Loading…
Cancel
Save