arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Sql.DLQ

Description

DLQ SQL templates.

Synopsis

Documentation

Source #data DLQMove

Whether a DLQ move re-checks the attempt budget it was selected on.

Constructors

MoveNow 
MoveIfExhausted 

Instances

Instances details
Eq DLQMove Source # 
Instance details

Defined in Arbiter.Core.Sql.DLQ

Methods

#(==) :: DLQMove -> DLQMove -> Bool

#(/=) :: DLQMove -> DLQMove -> Bool

Show DLQMove Source # 
Instance details

Defined in Arbiter.Core.Sql.DLQ

Source #moveToDLQSQL :: DLQMove -> Text -> Text -> Int64 -> Int64 -> Text -> Query Int64

Move a job to the DLQ in one statement. Copy each job column and the failure message.

Source #selectExhaustedJobsSQL :: Text -> Text -> Int -> Query (Int64, Int64, Maybe Int64, Bool)

Select up to limit claimable jobs that reached their attempt limit. Include the scalar fields required by the tree-aware DLQ operation. Process a large backlog in multiple bounded passes.

Source #retryFromDLQSQL :: Text -> Text -> Int64 -> Query (JobRead Value)

Retry a DLQ job and its complete DLQ tree in one statement. Any member identifies the tree. Restore the root, all descendants in the DLQ, and their finalizers. Keep a finalizer suspended when it has restored children. Make it ready when it has no children. Refuse a root whose parent is absent from the main queue. Remove the deduplication key during the retry.

Source #dlqJobExistsSQL :: Text -> Text -> Int64 -> Query Bool

Whether a DLQ job with the given id exists.

Source #deleteDLQJobSQL :: Text -> Text -> Int64 -> Query (Maybe Int64)

Delete a DLQ job, returning its parent id.

Source #moveToDLQBatchSQL :: Text -> Text -> [Int64] -> [Int64] -> [Text] -> Query Int64

moveToDLQSQL over unnested (id, claim_seq, error_msg) arrays, locking descending to match ack. Returns the ids moved.

Source #deleteDLQJobsBatchSQL :: Text -> Text -> [Int64] -> Query (Int64, Maybe Int64)

Delete DLQ jobs by id, returning each one's parent id.

Source #cascadeChildrenToDLQSQL :: Text -> Text -> Int64 -> Text -> Query Int64

Move every descendant of a rollup parent to the DLQ alongside it.

Source #countDLQChildrenBatchSQL :: Text -> Text -> [Int64] -> Query (Int64, Int64)

DLQ child count per parent, over a set of job ids.