We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe2f534 + bfa13bf commit d220ce1Copy full SHA for d220ce1
pkg/scheduler/plugins/gang/gang.go
@@ -35,6 +35,7 @@ func New(args *framework.PluginArgs) framework.Plugin {
35
}
36
37
38
+// readyTaskNum return the number of tasks that are ready to run.
39
func readyTaskNum(job *api.JobInfo) int32 {
40
occupid := 0
41
for status, tasks := range job.TaskStatusIndex {
@@ -46,11 +47,13 @@ func readyTaskNum(job *api.JobInfo) int32 {
46
47
return int32(occupid)
48
49
50
+// validTaskNum return the number of tasks that are valid.
51
func validTaskNum(job *api.JobInfo) int32 {
52
53
54
if api.AllocatedStatus(status) ||
55
status == api.Succeeded ||
56
+ status == api.Pipelined ||
57
status == api.Pending {
58
occupid = occupid + len(tasks)
59
0 commit comments