arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Sql.Archive

Description

Completed-job archive SQL templates.

Synopsis

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.