jobqueue-0.1.6: A job queue library

Safe HaskellNone
LanguageHaskell98

Network.JobQueue.Types

Synopsis

Documentation

data JobActionState e a Source

Constructors

JobActionState 

Fields

jobActions :: [ActionFn e a]
 

data (Env e, Unit a) => JobM e a b Source

type ActionM e a b = ActionT e a IO b Source

data ActionT e a m b Source

Instances

type ActionFn e a = e -> a -> IO (Either Break (Maybe (RuntimeState a))) Source

data ActionEnv e a Source

Constructors

ActionEnv 

Fields

getJobEnv :: e
 
getJobUnit :: a
 

Instances

class (Read a, Show a, Desc a, Eq a) => Unit a where Source

Unit class

Minimal complete definition

Nothing

Methods

getPriority :: a -> Int Source

Define the priority of a unit.

getRecovery :: a -> a Source

Define the recovery state of a unit.

toBeLogged :: a -> Bool Source

Define the logging necessity of a unit.

data RuntimeState a Source

Constructors

RS 

Fields

rsNextJob :: Maybe a
 
rsNextForks :: [(a, Maybe UTCTime)]
 
rsCommits :: Int
 

runS :: JobM e a b -> StateT (JobActionState e a) IO b Source