arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Sql.Stats

Description

Stats SQL templates.

Synopsis

Documentation

Source #getQueueStatsSQL :: RowCodec a -> SchemaName -> TableName -> [Text] -> Query a

Per-status queue counts plus the age of the oldest ready and in_flight job. Counts follow the jobStatusCaseSQL taxonomy and sum to total_jobs.

Source #allQueueStatsSQL :: RowCodec a -> SchemaName -> [(TableName, [Text])] -> Query a

Every queue's stats in one query, tagged by name. Caller guards the empty list.

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

Child counts as (parent_id, total, suspended) per parent, over a set of job ids. The caller attaches the row decoder.