ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.Jobs

Description

Generic code to work with jobs, e.g. submit jobs and check their status.

Synopsis

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.

execJobsWait #

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.

waitForJobs :: [JobId] -> Client -> IO (Result [(JobId, JobStatus)]) #

Polls a set of jobs at an increasing interval until all are finished one way or another.