Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Faktory.JobOptions
Contents
Synopsis
- data JobOptions = JobOptions {}
- retry :: Int -> JobOptions
- once :: JobOptions
- reserveFor :: Natural -> JobOptions
- queue :: Queue -> JobOptions
- jobtype :: String -> JobOptions
- at :: UTCTime -> JobOptions
- in_ :: NominalDiffTime -> JobOptions
- custom :: ToJSON a => a -> JobOptions
- getAtFromSchedule :: JobOptions -> IO (Maybe UTCTime)
- namespaceQueue :: Namespace -> JobOptions -> JobOptions
Documentation
data JobOptions Source #
Options for the execution of a job
These can be constructed using (<>)
:
let options =retry
1 <>jobtype
MyJob
To enqueue with defaults, use mempty
.
Options use Last
semantics, so (e.g.)
will set retries to
retry
x <>x
only if not already set, and <>
will override any
already-present retries to retry
xx
.
Constructors
JobOptions | |
Instances
Modifiers
retry :: Int -> JobOptions Source #
once :: JobOptions Source #
Equivalent to
: no retries, and move to Dead on failureretry
(-1)
reserveFor :: Natural -> JobOptions Source #
queue :: Queue -> JobOptions Source #
jobtype :: String -> JobOptions Source #
at :: UTCTime -> JobOptions Source #
in_ :: NominalDiffTime -> JobOptions Source #
custom :: ToJSON a => a -> JobOptions Source #
Enqueue-time modifiers
getAtFromSchedule :: JobOptions -> IO (Maybe UTCTime) Source #
namespaceQueue :: Namespace -> JobOptions -> JobOptions Source #