Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Jobs
Description
Generic code to work with jobs, e.g. submit jobs and check their status.
Synopsis
- submitJobs :: [[MetaOpCode]] -> Client -> IO (Result [JobId])
- type Annotator = OpCode -> MetaOpCode
- execWithCancel :: Annotator -> String -> [([[OpCode]], String)] -> IO (Result ())
- execJobsWait :: [[MetaOpCode]] -> ([JobId] -> IO ()) -> Client -> IO (Result [(JobId, JobStatus)])
- execJobsWaitOk :: [[MetaOpCode]] -> Client -> IO (Result ())
- waitForJobs :: [JobId] -> Client -> IO (Result [(JobId, JobStatus)])
Documentation
submitJobs :: [[MetaOpCode]] -> Client -> IO (Result [JobId]) #
Submits a set of jobs and returns their job IDs without waiting for completion.
type Annotator = OpCode -> MetaOpCode #
A simple type alias for clearer signature.
execWithCancel :: Annotator -> String -> [([[OpCode]], String)] -> IO (Result ()) #
Prepares to run a set of jobsets with handling of signals and early termination.
Arguments
:: [[MetaOpCode]] | The list of jobs |
-> ([JobId] -> IO ()) | Post-submission callback |
-> Client | The Luxi client |
-> IO (Result [(JobId, JobStatus)]) |
Executes a set of jobs and waits for their completion, returning their status.
execJobsWaitOk :: [[MetaOpCode]] -> Client -> IO (Result ()) #
Execute jobs and return Ok
only if all of them succeeded.