Safe Haskell | None |
---|---|
Language | Haskell98 |
- data JobActionState e a
- buildActionState :: (Env e, Unit a) => JobM e a () -> IO (JobActionState e a)
- runActionState :: (Env e, Unit a) => JobActionState e a -> e -> a -> IO (Maybe (JobResult a))
- runAction :: (Env e, Unit a) => e -> a -> ActionM e a () -> IO (Maybe (JobResult a))
- getEnv :: (Env e, Unit a) => ActionM e a e
- param :: (ParamEnv e, Unit a, Read b) => (String, String) -> ActionM e a b
- result :: (Env e, Unit a) => Maybe (JobResult a) -> ActionM e a ()
- next :: (Env e, Unit a) => a -> ActionM e a ()
- fin :: (Env e, Unit a) => ActionM e a ()
- none :: (Env e, Unit a) => ActionM e a ()
- fork :: (Env e, Unit a) => a -> ActionM e a ()
- forkInTime :: (Env e, Unit a) => NominalDiffTime -> a -> ActionM e a ()
- forkOnTime :: (Env e, Unit a) => UTCTime -> a -> ActionM e a ()
- abort :: (Env e, Unit a) => Alert -> String -> ActionM e a b
- logMsg :: (Env e, Unit a) => Alert -> String -> ActionM e a ()
- commitIO :: (Env e, Unit a) => IO b -> ActionM e a b
- data Alert
Documentation
data JobActionState e a Source
Default (JobActionState e a) | |
MonadState (JobActionState e a) (JobM e a) |
buildActionState :: (Env e, Unit a) => JobM e a () -> IO (JobActionState e a) Source
runActionState :: (Env e, Unit a) => JobActionState e a -> e -> a -> IO (Maybe (JobResult a)) Source
param :: (ParamEnv e, Unit a, Read b) => (String, String) -> ActionM e a b Source
Get a parameter value with a key from the environment in action. This is a special function for ParamEnv.
result :: (Env e, Unit a) => Maybe (JobResult a) -> ActionM e a () Source
Set the result of the action. (for internal use)
Move to the next state immediately. After the execution of the action the job being processed will be moved to the given state. The next action will be invoked immediately and can continue to work without being interrupted by another job.
none :: (Env e, Unit a) => ActionM e a () Source
If the unit passed by the job queue system cannot be processed by the action function, the function should call this.
forkInTime :: (Env e, Unit a) => NominalDiffTime -> a -> ActionM e a () Source
Create a job with a unit and schedule it after a few micro seconds.
Create a job with a unit and schedule it at a specific time.
abort :: (Env e, Unit a) => Alert -> String -> ActionM e a b Source
Abort the execution of a state machine. If a critical problem is found and there is a need to switch to the failure state, call this function with a human readable meassage.
logMsg :: (Env e, Unit a) => Alert -> String -> ActionM e a () Source
Put a message to syslog daemon.