arbiter-core-0.1.0.0: Core types and logic for PostgreSQL-backed job queue
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Job.DLQ

Description

Dead-letter queue types. Jobs land here after exhausting retries. Recover with retryFromDLQ or delete with deleteDLQJob.

Synopsis

Documentation

data DLQJob payload Source #

A job in the dead-letter queue.

Constructors

DLQJob 

Fields

  • dlqPrimaryKey :: Int64

    DLQ table primary key (distinct from the original job ID in the snapshot)

  • failedAt :: UTCTime

    When the job was moved to the DLQ

  • jobSnapshot :: JobSnapshot payload

    Full job state at time of failure (payload, attempts, last_error, etc.). For DLQ'd rollup finalizers, parentState on the snapshot carries the accumulated child results captured before the cascade delete.

Instances

Instances details
Generic (DLQJob payload) Source # 
Instance details

Defined in Arbiter.Core.Job.DLQ

Associated Types

type Rep (DLQJob payload) 
Instance details

Defined in Arbiter.Core.Job.DLQ

type Rep (DLQJob payload) = D1 ('MetaData "DLQJob" "Arbiter.Core.Job.DLQ" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DLQJob" 'PrefixI 'True) (S1 ('MetaSel ('Just "dlqPrimaryKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "failedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "jobSnapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (JobSnapshot payload)))))

Methods

from :: DLQJob payload -> Rep (DLQJob payload) x #

to :: Rep (DLQJob payload) x -> DLQJob payload #

Show payload => Show (DLQJob payload) Source # 
Instance details

Defined in Arbiter.Core.Job.DLQ

Methods

showsPrec :: Int -> DLQJob payload -> ShowS #

show :: DLQJob payload -> String #

showList :: [DLQJob payload] -> ShowS #

Eq payload => Eq (DLQJob payload) Source # 
Instance details

Defined in Arbiter.Core.Job.DLQ

Methods

(==) :: DLQJob payload -> DLQJob payload -> Bool #

(/=) :: DLQJob payload -> DLQJob payload -> Bool #

type Rep (DLQJob payload) Source # 
Instance details

Defined in Arbiter.Core.Job.DLQ

type Rep (DLQJob payload) = D1 ('MetaData "DLQJob" "Arbiter.Core.Job.DLQ" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DLQJob" 'PrefixI 'True) (S1 ('MetaSel ('Just "dlqPrimaryKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64) :*: (S1 ('MetaSel ('Just "failedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "jobSnapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (JobSnapshot payload)))))

type JobSnapshot payload = Job payload Int64 Text UTCTime Source #

Full job state at the time of DLQ insertion.