Safe Haskell | Safe-Infered |
---|
Generic code to work with jobs, e.g. submit jobs and check their status.
- type Annotator = OpCode -> MetaOpCode
- execCancelWrapper :: Annotator -> String -> IORef Int -> [([[OpCode]], String)] -> [(String, [(Int, JobStatus)])] -> IO (Result ())
- execJobSet :: Annotator -> String -> IORef Int -> [([[OpCode]], String)] -> [(String, [(Int, JobStatus)])] -> IO (Result ())
- handleSigInt :: IORef Int -> IO ()
- handleSigTerm :: IORef Int -> IO ()
- execWithCancel :: Annotator -> String -> [([[OpCode]], String)] -> IO (Result ())
- submitJobs :: [[MetaOpCode]] -> Client -> IO (Result [JobId])
- execJobsWait :: [[MetaOpCode]] -> ([JobId] -> IO ()) -> Client -> IO (Result [(JobId, JobStatus)])
- waitForJob :: Client -> JobId -> ResultT String IO (JobId, JobStatus)
- waitForJobs :: [JobId] -> Client -> IO (Result [(JobId, JobStatus)])
- execJobsWaitOkJid :: [[MetaOpCode]] -> Client -> IO (Result [JobId])
- execJobsWaitOk :: [[MetaOpCode]] -> Client -> IO (Result ())
- forceFailover :: OpCode -> OpCode
Documentation
type Annotator = OpCode -> MetaOpCodeSource
A simple type alias for clearer signature.
execCancelWrapper :: Annotator -> String -> IORef Int -> [([[OpCode]], String)] -> [(String, [(Int, JobStatus)])] -> IO (Result ())Source
execJobSet :: Annotator -> String -> IORef Int -> [([[OpCode]], String)] -> [(String, [(Int, JobStatus)])] -> IO (Result ())Source
handleSigInt :: IORef Int -> IO ()Source
handleSigTerm :: IORef Int -> IO ()Source
execWithCancel :: Annotator -> String -> [([[OpCode]], String)] -> IO (Result ())Source
Prepares to run a set of jobsets with handling of signals and early termination.
submitJobs :: [[MetaOpCode]] -> Client -> IO (Result [JobId])Source
Submits a set of jobs and returns their job IDs without waiting for completion.
:: [[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.
waitForJobs :: [JobId] -> Client -> IO (Result [(JobId, JobStatus)])Source
Polls a set of jobs at an increasing interval until all are finished one way or another.
execJobsWaitOkJid :: [[MetaOpCode]] -> Client -> IO (Result [JobId])Source
Execute jobs and return Ok
only if all of them succeeded; in
this case, also return the list of Job IDs.
execJobsWaitOk :: [[MetaOpCode]] -> Client -> IO (Result ())Source
Execute jobs and return Ok
only if all of them succeeded.
forceFailover :: OpCode -> OpCodeSource
Channge Migrations to Failovers