From 01a6fc676683b2557814ee7a008dd95b77fd1b60 Mon Sep 17 00:00:00 2001 From: zionwu Date: Fri, 20 Dec 2019 15:45:33 +0800 Subject: [PATCH] Push job back to queue if task is assigned --- pkg/scheduler/actions/reclaim/reclaim.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/scheduler/actions/reclaim/reclaim.go b/pkg/scheduler/actions/reclaim/reclaim.go index 9891497657..963397fa5a 100644 --- a/pkg/scheduler/actions/reclaim/reclaim.go +++ b/pkg/scheduler/actions/reclaim/reclaim.go @@ -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) @@ -195,8 +196,9 @@ func (alloc *reclaimAction) Execute(ssn *framework.Session) { } if assigned { - queues.Push(queue) + jobs.Push(job) } + queues.Push(queue) } }