Skip to content

Commit

Permalink
Push job back to queue if task is assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
zionwu committed Dec 20, 2019
1 parent 8d82937 commit 01a6fc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/scheduler/actions/reclaim/reclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func (alloc *reclaimAction) Execute(ssn *framework.Session) {
}

// Found "high" priority job
if jobs, found := preemptorsMap[queue.UID]; !found || jobs.Empty() {
jobs, found := preemptorsMap[queue.UID]
if !found || jobs.Empty() {
continue
} else {
job = jobs.Pop().(*api.JobInfo)
Expand Down Expand Up @@ -195,8 +196,9 @@ func (alloc *reclaimAction) Execute(ssn *framework.Session) {
}

if assigned {
queues.Push(queue)
jobs.Push(job)
}
queues.Push(queue)
}

}
Expand Down

0 comments on commit 01a6fc6

Please sign in to comment.