Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#480 from k82cn/add_pipelined_pods
Browse files Browse the repository at this point in the history
Added Pipelined Pods as valid tasks.
  • Loading branch information
k8s-ci-robot authored Nov 24, 2018
2 parents 0f73536 + 679ad54 commit 2667f4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/scheduler/plugins/gang/gang.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func New(args *framework.PluginArgs) framework.Plugin {
}
}

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

// validTaskNum return the number of tasks that are valid.
func validTaskNum(job *api.JobInfo) int32 {
occupid := 0
for status, tasks := range job.TaskStatusIndex {
if api.AllocatedStatus(status) ||
status == api.Succeeded ||
status == api.Pipelined ||
status == api.Pending {
occupid = occupid + len(tasks)
}
Expand Down

0 comments on commit 2667f4a

Please sign in to comment.