Revision f7819050 src/Ganeti/JQueue.hs

b/src/Ganeti/JQueue.hs
374 374
          serial <- jobQueueSerialFile
375 375
          write_result <- try $ atomicWriteFile serial serial_content
376 376
                          :: IO (Either IOError ())
377
          putMVar lock ()
378 377
          case write_result of
379 378
            Left e -> do
379
              putMVar lock ()
380 380
              let msg = "Failed to write serial file: " ++ show e
381 381
              logError msg
382 382
              return . Bad $ msg 
383 383
            Right () -> do
384 384
              _ <- executeRpcCall mastercandidates
385 385
                     $ RpcCallJobqueueUpdate serial serial_content
386
              putMVar lock ()
386 387
              return $ mapM makeJobId [(current+1)..(current+n)]
387 388

  
388 389
-- | Allocate one new job id.

Also available in: Unified diff