Commit 9fd653a4 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Add wrapper to replicate many jobs



Add a convenience wrapper around replicateJob to replicate
many jobs to the master candidates.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent b5a96995
......@@ -49,7 +49,7 @@ module Ganeti.JQueue
, allocateJobIds
, allocateJobId
, writeJobToDisk
, replicateJob
, replicateManyJobs
, isQueueOpen
) where
......@@ -359,6 +359,11 @@ replicateJob rootdir mastercandidates job = do
logRpcErrors result
return result
-- | Replicate many jobs to all master candidates.
replicateManyJobs :: FilePath -> [Node] -> [QueuedJob] -> IO ()
replicateManyJobs rootdir mastercandidates =
mapM_ (replicateJob rootdir mastercandidates)
-- | Read the job serial number from disk.
readSerialFromDisk :: IO (Result JobId)
readSerialFromDisk = do
......
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