Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit f5d5996

Browse files
authored
Merge pull request #480 from k82cn/add_pipelined_pods
Added Pipelined Pods as valid tasks.
2 parents 291729e + b2fac4e commit f5d5996

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/scheduler/plugins/gang/gang.go

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func New(args *framework.PluginArgs) framework.Plugin {
3535
}
3636
}
3737

38+
// readyTaskNum return the number of tasks that are ready to run.
3839
func readyTaskNum(job *api.JobInfo) int32 {
3940
occupid := 0
4041
for status, tasks := range job.TaskStatusIndex {
@@ -46,11 +47,13 @@ func readyTaskNum(job *api.JobInfo) int32 {
4647
return int32(occupid)
4748
}
4849

50+
// validTaskNum return the number of tasks that are valid.
4951
func validTaskNum(job *api.JobInfo) int32 {
5052
occupid := 0
5153
for status, tasks := range job.TaskStatusIndex {
5254
if api.AllocatedStatus(status) ||
5355
status == api.Succeeded ||
56+
status == api.Pipelined ||
5457
status == api.Pending {
5558
occupid = occupid + len(tasks)
5659
}

0 commit comments

Comments
 (0)