faktory-1.0.1.3: 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

data JobOptions Source #

Options for the execution of a job

See perform for more details.

perform :: (HasCallStack, ToJSON arg) => JobOptions -> Producer -> 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

once :: JobOptions Source #

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

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

jobJid :: Job arg -> JobId Source #

jobArg :: Job arg -> arg Source #