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

Added Pipelined Pods as valid tasks. #480

Merged
merged 1 commit into from
Nov 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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