Commit 2037242f authored by Petr Pudlak's avatar Petr Pudlak

Count manipulated jobs when selecting jobs to run

Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 8766d928
......@@ -278,7 +278,7 @@ jobEligible queue jWS =
-- pure function doing the scheduling.
selectJobsToRun :: Int -> Queue -> (Queue, [JobWithStat])
selectJobsToRun count queue =
let n = count - length (qRunning queue)
let n = count - length (qRunning queue) - length (qManipulated queue)
chosen = take n . filter (jobEligible queue) $ qEnqueued queue
remain = deleteFirstsBy ((==) `on` (qjId . jJob)) (qEnqueued queue) chosen
in (queue {qEnqueued=remain, qRunning=qRunning queue ++ chosen}, chosen)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment