| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Sql.Archive
Description
Completed-job archive SQL templates.
Synopsis
- archiveAckCte :: Text -> Text -> Text -> Text
- updateArchiveResultSQL :: Text -> Text -> Value -> Int64 -> Query ()
- updateArchiveResultsBatchSQL :: Text -> Text -> [Int64] -> [Value] -> Query ()
- purgeArchiveSQL :: Text -> Text -> Text
- archivePurgeBatch :: Int
- listArchiveFilteredSQL :: Text -> Text -> Query () -> Text -> Int64 -> Int64 -> Query (Int64, UTCTime, JobRead Value, Maybe Value)
- countArchiveFilteredSQL :: Text -> Text -> Query () -> Query Int64
- deleteArchiveJobSQL :: Text -> Text -> Int64 -> Query ()
- deleteArchiveJobsBatchSQL :: Text -> Text -> [Int64] -> Query ()
- reEnqueueFromArchiveSQL :: Text -> Text -> Int64 -> Query (JobRead Value)
- allArchiveColumns :: Text
Documentation
Source #archiveAckCte :: Text -> Text -> Text -> Text
The archived CTE teeing rows from the named ack CTE into the archive, per-row
on archive_for. archive_expires_at is precomputed. Shared by single and batch ack.
Source #updateArchiveResultSQL :: Text -> Text -> Value -> Int64 -> Query ()
Set a completed root job's stored result on its archive row. No-ops without
an archive row.
Source #updateArchiveResultsBatchSQL :: Text -> Text -> [Int64] -> [Value] -> Query ()
updateArchiveResultSQL for several jobs in one statement.
Source #purgeArchiveSQL :: Text -> Text -> Text
Delete up to archivePurgeBatch archived jobs whose per-row
archive_expires_at has passed.
Source #archivePurgeBatch :: Int
Per-queue cap on archived jobs purged in one reaper pass.
Source #listArchiveFilteredSQL :: Text -> Text -> Query () -> Text -> Int64 -> Int64 -> Query (Int64, UTCTime, JobRead Value, Maybe Value)
List archived jobs under a dynamic WHERE.
Source #countArchiveFilteredSQL :: Text -> Text -> Query () -> Query Int64
Count archived jobs under a dynamic WHERE.
Source #deleteArchiveJobSQL :: Text -> Text -> Int64 -> Query ()
Delete one archived job by its archive primary key.
Source #deleteArchiveJobsBatchSQL :: Text -> Text -> [Int64] -> Query ()
Delete archived jobs by archive primary key.
Source #reEnqueueFromArchiveSQL :: Text -> Text -> Int64 -> Query (JobRead Value)
Re-enqueue an archived job as a fresh standalone job, keeping the archive
row. Carries enqueuedAgainCols and resets the other columns to their defaults.
Source #allArchiveColumns :: Text
The archive read columns, in codec order. The archive uses job_id for the
main-table id.