Revision a6b33b72 src/Ganeti/JQueue.hs

b/src/Ganeti/JQueue.hs
32 32
    , queuedOpCodeFromMetaOpCode
33 33
    , queuedJobFromOpCodes
34 34
    , changeOpCodePriority
35
    , changeJobPriority
35 36
    , cancelQueuedJob
36 37
    , Timestamp
37 38
    , fromClockTime
......
227 228
cancelOpCode now op =
228 229
  op { qoStatus = OP_STATUS_CANCELED, qoEndTimestamp = Just now }
229 230

  
231
-- | Change the priority of a job, i.e., change the priority of the
232
-- non-finalized opcodes.
233
changeJobPriority :: Int -> QueuedJob -> QueuedJob
234
changeJobPriority prio job =
235
  job { qjOps = map (changeOpCodePriority prio) $ qjOps job }
236

  
230 237
-- | Transform a QueuedJob that has not been started into its canceled form.
231 238
cancelQueuedJob :: Timestamp -> QueuedJob -> QueuedJob
232 239
cancelQueuedJob now job =

Also available in: Unified diff