Browse Source

#2901

fix bug
fix-2901
chenyifan01 2 years ago
parent
commit
83e987abde
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      routers/repo/cloudbrain.go

+ 5
- 8
routers/repo/cloudbrain.go View File

@@ -1353,14 +1353,11 @@ func StopJobs(cloudBrains []*models.Cloudbrain) {
logErrorAndUpdateJobStatus(err, taskInfo) logErrorAndUpdateJobStatus(err, taskInfo)
} }
} else if taskInfo.Type == models.TypeC2Net { } else if taskInfo.Type == models.TypeC2Net {
if taskInfo.JobType == string(models.JobTypeTrain) {
err := retry(3, time.Second*30, func() error {
_, err := grampus.StopJob(taskInfo.JobID)
return err
})
logErrorAndUpdateJobStatus(err, taskInfo)
}

err := retry(3, time.Second*30, func() error {
_, err := grampus.StopJob(taskInfo.JobID, taskInfo.JobType)
return err
})
logErrorAndUpdateJobStatus(err, taskInfo)
} }
} }
} }


Loading…
Cancel
Save