Skip to content

Commit ea5b9a1

Browse files
authored
Small refactoring in job_info, preparing for SubGroups (#341)
1 parent da63f05 commit ea5b9a1

File tree

4 files changed

+115
-114
lines changed

4 files changed

+115
-114
lines changed

pkg/scheduler/actions/common/solvers/job_solver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (s *JobSolver) Solve(
8080
}
8181

8282
numActiveTasks := pendingJob.GetNumActiveUsedTasks()
83-
jobSolved := numActiveTasks >= int(pendingJob.MinAvailable)
83+
jobSolved := pendingJob.IsGangSatisfied()
8484
if originalNumActiveTasks >= numActiveTasks {
8585
jobSolved = false
8686
}

pkg/scheduler/actions/stalegangeviction/stalegangeviction.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (action *staleGangEviction) Execute(ssn *framework.Session) {
3030
log.InfraLogger.V(2).Infof("Enter StaleGangEviction ...")
3131
defer log.InfraLogger.V(2).Infof("Leaving StaleGangEviction ...")
3232
for _, job := range ssn.PodGroupInfos {
33-
if job.IsPodGroupStale() {
33+
if job.IsStale() {
3434
handleStaleJob(ssn, job)
3535
} else {
3636
handleNonStaleJob(job)

0 commit comments

Comments
 (0)