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