|
@@ -48,8 +48,8 @@ const ( |
|
|
PerPage = 10 |
|
|
PerPage = 10 |
|
|
IsLatestVersion = "1" |
|
|
IsLatestVersion = "1" |
|
|
NotLatestVersion = "0" |
|
|
NotLatestVersion = "0" |
|
|
DebugType = -1 |
|
|
|
|
|
VersionCount = 1 |
|
|
|
|
|
|
|
|
DebugType = -1 |
|
|
|
|
|
VersionCount = 1 |
|
|
|
|
|
|
|
|
SortByCreateTime = "create_time" |
|
|
SortByCreateTime = "create_time" |
|
|
ConfigTypeCustom = "custom" |
|
|
ConfigTypeCustom = "custom" |
|
@@ -211,14 +211,15 @@ func GenerateTask(ctx *context.Context, jobName, uuid, description, flavor strin |
|
|
} |
|
|
} |
|
|
err = models.CreateCloudbrain(&models.Cloudbrain{ |
|
|
err = models.CreateCloudbrain(&models.Cloudbrain{ |
|
|
|
|
|
|
|
|
Status: string(models.JobWaiting), |
|
|
|
|
|
UserID: ctx.User.ID, |
|
|
|
|
|
RepoID: ctx.Repo.Repository.ID, |
|
|
|
|
|
JobID: jobResult.ID, |
|
|
|
|
|
JobName: jobName, |
|
|
|
|
|
JobType: string(models.JobTypeDebug), |
|
|
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
|
|
Uuid: uuid, |
|
|
|
|
|
|
|
|
Status: string(models.JobWaiting), |
|
|
|
|
|
UserID: ctx.User.ID, |
|
|
|
|
|
RepoID: ctx.Repo.Repository.ID, |
|
|
|
|
|
JobID: jobResult.ID, |
|
|
|
|
|
JobName: jobName, |
|
|
|
|
|
JobType: string(models.JobTypeDebug), |
|
|
|
|
|
Type: models.TypeCloudBrainTwo, |
|
|
|
|
|
Uuid: uuid, |
|
|
|
|
|
ComputeResource: models.NPUResource, |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
if err != nil { |
|
|
if err != nil { |
|
|