Revision 1b94c0db src/Ganeti/JQueue.hs

b/src/Ganeti/JQueue.hs
49 49
    , allocateJobIds
50 50
    , allocateJobId
51 51
    , writeJobToDisk
52
    , isQueueOpen
52 53
    ) where
53 54

  
54 55
import Control.Concurrent.MVar
......
389 390
allocateJobId mastercandidates lock = do
390 391
  jids <- allocateJobIds mastercandidates lock 1
391 392
  return (jids >>= monadicThe "Failed to allocate precisely one Job ID")
393

  
394
-- | Decide if job queue is open
395
isQueueOpen :: IO Bool
396
isQueueOpen = liftM not (jobQueueDrainFile >>= doesFileExist)

Also available in: Unified diff