Revision 557f5dad src/Ganeti/JQueue.hs
b/src/Ganeti/JQueue.hs | ||
---|---|---|
58 | 58 |
, startJobs |
59 | 59 |
) where |
60 | 60 |
|
61 |
import Control.Arrow (second) |
|
61 | 62 |
import Control.Concurrent.MVar |
62 | 63 |
import Control.Exception |
63 | 64 |
import Control.Monad |
65 |
import Data.Functor ((<$)) |
|
64 | 66 |
import Data.List |
65 | 67 |
import Data.Maybe |
66 | 68 |
import Data.Ord (comparing) |
67 | 69 |
-- workaround what seems to be a bug in ghc 7.4's TH shadowing code |
68 |
import Prelude hiding (log, id)
|
|
70 |
import Prelude hiding (id, log)
|
|
69 | 71 |
import System.Directory |
70 | 72 |
import System.FilePath |
71 | 73 |
import System.IO.Error (isDoesNotExistError) |
... | ... | |
381 | 383 |
replicateJob rootdir mastercandidates job = do |
382 | 384 |
let filename = liveJobFile rootdir . qjId $ job |
383 | 385 |
content = Text.JSON.encode . Text.JSON.showJSON $ job |
384 |
result <- executeRpcCall mastercandidates |
|
385 |
$ RpcCallJobqueueUpdate filename content |
|
386 |
callresult <- executeRpcCall mastercandidates |
|
387 |
$ RpcCallJobqueueUpdate filename content |
|
388 |
let result = map (second (() <$)) callresult |
|
386 | 389 |
logRpcErrors result |
387 | 390 |
return result |
388 | 391 |
|
Also available in: Unified diff