faktory-1.0.0.0: Faktory Worker for Haskell

Safe HaskellNone
LanguageHaskell2010

Faktory.Job

Synopsis

Documentation

data Job arg Source #

Instances
Generic (Job arg) Source # 
Instance details

Defined in Faktory.Job

Associated Types

type Rep (Job arg) :: Type -> Type #

Methods

from :: Job arg -> Rep (Job arg) x #

to :: Rep (Job arg) x -> Job arg #

ToJSON args => ToJSON (Job args) Source # 
Instance details

Defined in Faktory.Job

Methods

toJSON :: Job args -> Value #

toEncoding :: Job args -> Encoding #

toJSONList :: [Job args] -> Value #

toEncodingList :: [Job args] -> Encoding #

FromJSON args => FromJSON (Job args) Source # 
Instance details

Defined in Faktory.Job

Methods

parseJSON :: Value -> Parser (Job args) #

parseJSONList :: Value -> Parser [Job args] #

type Rep (Job arg) Source # 
Instance details

Defined in Faktory.Job

perform :: (HasCallStack, ToJSON arg) => JobOptions -> Client -> arg -> IO JobId Source #

Perform a Job with the given options

perform mempty SomeJob
perform (queue SomeQueue) SomeJob
perform once SomeJob
perform (at someTime <> once) SomeJob
perform (in_ 10 <> once) SomeJob
perform (in_ 10 <> retry 3) SomeJob

retry :: Int -> JobOptions Source #

once :: JobOptions Source #

Equivalent to retry (-1): no retries, and move to Dead on failure

queue :: Queue -> JobOptions Source #

jobtype :: String -> JobOptions Source #

at :: UTCTime -> JobOptions Source #

in_ :: NominalDiffTime -> JobOptions Source #

newJob :: arg -> IO (Job arg) Source #

jobJid :: Job arg -> JobId Source #

jobArg :: Job arg -> arg Source #