Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Job arg
- type JobId = String
- data JobOptions
- perform :: (HasCallStack, ToJSON arg) => JobOptions -> Producer -> arg -> IO JobId
- retry :: Int -> JobOptions
- once :: JobOptions
- queue :: Queue -> JobOptions
- jobtype :: String -> JobOptions
- at :: UTCTime -> JobOptions
- in_ :: NominalDiffTime -> JobOptions
- newJob :: arg -> IO (Job arg)
- jobJid :: Job arg -> JobId
- jobArg :: Job arg -> arg
Documentation
Instances
Generic (Job arg) Source # | |
ToJSON args => ToJSON (Job args) Source # | |
Defined in Faktory.Job | |
FromJSON args => FromJSON (Job args) Source # | |
type Rep (Job arg) Source # | |
Defined in Faktory.Job type Rep (Job arg) = D1 (MetaData "Job" "Faktory.Job" "faktory-1.0.1.3-B4pL0PsFhGgAyBxztkp0Ni" False) (C1 (MetaCons "Job" PrefixI True) ((S1 (MetaSel (Just "jobJid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 JobId) :*: (S1 (MetaSel (Just "jobJobtype") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "jobArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (NonEmpty arg)))) :*: (S1 (MetaSel (Just "jobRetry") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 (MetaSel (Just "jobQueue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Queue)) :*: S1 (MetaSel (Just "jobAt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe UTCTime)))))) |
data JobOptions Source #
Options for the execution of a job
See
for more details.perform
Instances
Semigroup JobOptions Source # | |
Defined in Faktory.Job (<>) :: JobOptions -> JobOptions -> JobOptions # sconcat :: NonEmpty JobOptions -> JobOptions # stimes :: Integral b => b -> JobOptions -> JobOptions # | |
Monoid JobOptions Source # | |
Defined in Faktory.Job mempty :: JobOptions # mappend :: JobOptions -> JobOptions -> JobOptions # mconcat :: [JobOptions] -> JobOptions # |
perform :: (HasCallStack, ToJSON arg) => JobOptions -> Producer -> arg -> IO JobId Source #
retry :: Int -> JobOptions Source #
once :: JobOptions Source #
Equivalent to
: no retries, and move to Dead on failureretry
(-1)
queue :: Queue -> JobOptions Source #
jobtype :: String -> JobOptions Source #
at :: UTCTime -> JobOptions Source #
in_ :: NominalDiffTime -> JobOptions Source #