|
|
@@ -1803,7 +1803,7 @@ func GetBenchmarkCountByUserID(userID int64) (int, error) { |
|
|
|
func GetWaitingCloudbrainCount(cloudbrainType int, computeResource string, jobTypes ...JobType) (int64, error) { |
|
|
|
sess := x.Where("status=? and type=?", JobWaiting, cloudbrainType) |
|
|
|
if len(jobTypes) > 0 { |
|
|
|
sess.In("JobType", jobTypes) |
|
|
|
sess.In("job_type", jobTypes) |
|
|
|
} |
|
|
|
if computeResource != "" { |
|
|
|
sess.And("compute_resource=?", computeResource) |
|
|
|