arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Sql.Queues

Description

Internal to the arbiter packages. Not covered by the PVP.

Queues SQL templates.

Synopsis

Documentation

ensureQueueSQL :: SchemaName -> Text -> Query ()Source #

Insert an arbiter_queues row with defaults if one does not already exist.

setQueuePausedSQL :: SchemaName -> Text -> Bool -> Query Int64Source #

Upsert the queue's paused flag and fan one NOTIFY per worker in the queue. paused_at is set on first pause, cleared on resume, untouched on re-pause.

setQueueDLQRetentionSQL :: SchemaName -> Text -> Maybe Int64 -> Query ()Source #

Upsert the queue's DLQ retention in seconds. Nothing keeps its DLQ jobs.

queueDLQRetentionsSQL :: SchemaName -> Query (Text, Int64)Source #

The queues with a DLQ retention, with the retention in seconds.

existingQueuesSQL :: SchemaName -> Query TextSource #

The arbiter_queues names whose job and DLQ tables exist in the schema.

getQueueSQL :: SchemaName -> Text -> Query QueueRowSource #

Get the arbiter_queues row for a single queue.

listQueuesSQL :: SchemaName -> Query QueueRowSource #

List all arbiter_queues rows.