| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Sql.Stats
Description
Stats SQL templates.
Synopsis
- getQueueStatsSQL :: RowCodec a -> SchemaName -> TableName -> [Text] -> Query a
- allQueueStatsSQL :: RowCodec a -> SchemaName -> [(TableName, [Text])] -> Query a
- countChildrenBatchSQL :: Text -> Text -> [Int64] -> Query ()
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.