| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Job.Types.Internal
Description
Internal to the arbiter packages. Not covered by the PVP.
The job record type and its field accessors.
Synopsis
- data JobRecord payload key q insertedAt adm = Job {
- primaryKey :: key
- payload :: payload
- queueName :: q
- groupKey :: Maybe Text
- insertedAt :: insertedAt
- updatedAt :: Maybe UTCTime
- attempts :: Int32
- lastError :: Maybe Text
- priority :: Int32
- lastAttemptedAt :: Maybe UTCTime
- notVisibleUntil :: Maybe UTCTime
- dedupKey :: Maybe DedupKey
- maxAttempts :: Maybe Int32
- parentId :: Maybe Int64
- parentState :: Maybe Value
- traceContext :: Maybe TraceContext
- suspended :: Bool
- claimedBy :: Maybe UUID
- claimSeq :: Int64
- archiveFor :: Maybe Int32
- payloadKeys :: adm
- type Job payload key q insertedAt adm = JobRecord payload key q insertedAt adm
- newtype Stored payload = Stored ByteString
- storedBytes :: Stored payload -> ByteString
- primaryKey :: Job payload key q insertedAt adm -> key
- payload :: Job payload key q insertedAt adm -> payload
- queueName :: Job payload key q insertedAt adm -> q
- groupKey :: Job payload key q insertedAt adm -> Maybe Text
- insertedAt :: Job payload key q insertedAt adm -> insertedAt
- updatedAt :: Job payload Int64 q insertedAt adm -> Maybe UTCTime
- attempts :: Job payload Int64 q insertedAt adm -> Int32
- lastError :: Job payload Int64 q insertedAt adm -> Maybe Text
- priority :: Job payload key q insertedAt adm -> Int32
- lastAttemptedAt :: Job payload Int64 q insertedAt adm -> Maybe UTCTime
- notVisibleUntil :: Job payload key q insertedAt adm -> Maybe UTCTime
- dedupKey :: Job payload key q insertedAt adm -> Maybe DedupKey
- maxAttempts :: Job payload key q insertedAt adm -> Maybe Int32
- parentId :: Job payload Int64 q insertedAt adm -> Maybe Int64
- parentState :: Job payload Int64 q insertedAt adm -> Maybe Value
- traceContext :: Job payload key q insertedAt adm -> Maybe TraceContext
- suspended :: Job payload Int64 q insertedAt adm -> Bool
- claimedBy :: Job payload Int64 q insertedAt adm -> Maybe UUID
- claimSeq :: Job payload Int64 q insertedAt adm -> Int64
- archiveFor :: Job payload key q insertedAt adm -> Maybe Int32
- payloadKeys :: Job payload key q insertedAt adm -> adm
Documentation
data JobRecord payload key q insertedAt admSource #
Internal representation shared by writable and stored jobs.
Constructors
| Job | |
Fields
| |
Instances
| FromJSON payload => FromJSON (JobRead payload) Source # | Decode the complete persisted representation of a job. |
Defined in Arbiter.Core.Job.Types | |
| ToJSON payload => ToJSON (JobRead payload) Source # | |
| (Eq key, Eq payload, Eq q, Eq insertedAt, Eq adm) => Eq (JobRecord payload key q insertedAt adm) Source # | |
| (Show key, Show payload, Show q, Show insertedAt, Show adm) => Show (JobRecord payload key q insertedAt adm) Source # | |
type Job payload key q insertedAt adm = JobRecord payload key q insertedAt admSource #
A job parametrized over payload, primary key, queue name, insertion timestamp, and the columns derived from the payload. The constructor is internal.
newtype Stored payloadSource #
A payload as the JSON bytes the database holds. The type it decodes to is a phantom.
Constructors
| Stored ByteString |
storedBytes :: Stored payload -> ByteStringSource #
The JSON bytes of a stored payload.
primaryKey :: Job payload key q insertedAt adm -> keySource #
Database-assigned identifier for a stored job.
groupKey :: Job payload key q insertedAt adm -> Maybe TextSource #
Serial-processing group, or Nothing for an ungrouped job.
insertedAt :: Job payload key q insertedAt adm -> insertedAtSource #
Time at which the job was inserted.
updatedAt :: Job payload Int64 q insertedAt adm -> Maybe UTCTimeSource #
Time at which the job was last updated.
lastError :: Job payload Int64 q insertedAt adm -> Maybe TextSource #
Error message from the last failed attempt.
priority :: Job payload key q insertedAt adm -> Int32Source #
Claim priority. Lower numbers have higher priority. In a group, a retried job goes first.
lastAttemptedAt :: Job payload Int64 q insertedAt adm -> Maybe UTCTimeSource #
Time at which a worker last claimed the job.
notVisibleUntil :: Job payload key q insertedAt adm -> Maybe UTCTimeSource #
Earliest time at which the job can be claimed.
dedupKey :: Job payload key q insertedAt adm -> Maybe DedupKeySource #
Deduplication strategy and key.
maxAttempts :: Job payload key q insertedAt adm -> Maybe Int32Source #
Attempt limit before the job moves to the DLQ.
parentId :: Job payload Int64 q insertedAt adm -> Maybe Int64Source #
Identifier of this job's parent in a job tree.
parentState :: Job payload Int64 q insertedAt adm -> Maybe ValueSource #
Snapshot of accumulated child results for a rollup finalizer.
traceContext :: Job payload key q insertedAt adm -> Maybe TraceContextSource #
W3C trace context captured at enqueue.
suspended :: Job payload Int64 q insertedAt adm -> BoolSource #
Whether the job is suspended. It stays unclaimable until resumed.
claimedBy :: Job payload Int64 q insertedAt adm -> Maybe UUIDSource #
Holder of the outstanding claim. Nothing when no claim is outstanding.
archiveFor :: Job payload key q insertedAt adm -> Maybe Int32Source #
Completed-job archive retention in seconds.
payloadKeys :: Job payload key q insertedAt adm -> admSource #
The labels and keys stamped from the payload at enqueue.