|
@@ -1007,13 +1007,13 @@ func GetCloudbrainByJobIDAndIsLatestVersion(jobID string, isLatestVersion string |
|
|
|
|
|
|
|
|
func GetCloudbrainsNeededStopByUserID(userID int64) ([]*Cloudbrain, error) { |
|
|
func GetCloudbrainsNeededStopByUserID(userID int64) ([]*Cloudbrain, error) { |
|
|
cloudBrains := make([]*Cloudbrain, 0) |
|
|
cloudBrains := make([]*Cloudbrain, 0) |
|
|
err := x.Cols("job_id", "status", "type").Where("user_id=? AND status !=?", userID, string(JobStopped)).Find(&cloudBrains) |
|
|
|
|
|
|
|
|
err := x.Cols("job_id", "status", "type", "job_type", "version_id").Where("user_id=? AND status !=?", userID, string(JobStopped)).Find(&cloudBrains) |
|
|
return cloudBrains, err |
|
|
return cloudBrains, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func GetCloudbrainsNeededStopByRepoID(repoID int64) ([]*Cloudbrain, error) { |
|
|
func GetCloudbrainsNeededStopByRepoID(repoID int64) ([]*Cloudbrain, error) { |
|
|
cloudBrains := make([]*Cloudbrain, 0) |
|
|
cloudBrains := make([]*Cloudbrain, 0) |
|
|
err := x.Cols("job_id", "status", "type").Where("repo_id=? AND status !=?", repoID, string(JobStopped)).Find(&cloudBrains) |
|
|
|
|
|
|
|
|
err := x.Cols("job_id", "status", "type", "job_type", "version_id").Where("repo_id=? AND status !=?", repoID, string(JobStopped)).Find(&cloudBrains) |
|
|
return cloudBrains, err |
|
|
return cloudBrains, err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|