| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Sql.DLQ
Description
DLQ SQL templates.
Synopsis
- data DLQMove
- moveToDLQSQL :: DLQMove -> Text -> Text -> Int64 -> Int64 -> Text -> Query Int64
- selectExhaustedJobsSQL :: Text -> Text -> Int -> Query (Int64, Int64, Maybe Int64, Bool)
- retryFromDLQSQL :: Text -> Text -> Int64 -> Query (JobRead Value)
- dlqJobExistsSQL :: Text -> Text -> Int64 -> Query Bool
- deleteDLQJobSQL :: Text -> Text -> Int64 -> Query (Maybe Int64)
- moveToDLQBatchSQL :: Text -> Text -> [Int64] -> [Int64] -> [Text] -> Query Int64
- deleteDLQJobsBatchSQL :: Text -> Text -> [Int64] -> Query (Int64, Maybe Int64)
- cascadeChildrenToDLQSQL :: Text -> Text -> Int64 -> Text -> Query Int64
- countDLQChildrenBatchSQL :: Text -> Text -> [Int64] -> Query (Int64, Int64)
Documentation
Whether a DLQ move re-checks the attempt budget it was selected on.
Constructors
| MoveNow | |
| MoveIfExhausted |
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.