| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Worker
Description
Types and DDL for the arbiter_workers table.
Synopsis
- data WorkerRow = WorkerRow {
- workerId :: UUID
- queueName :: Text
- hostName :: Maybe Text
- workerCount :: Maybe Int32
- startedAt :: UTCTime
- lastHeartbeat :: UTCTime
- shuttingDown :: Bool
- paused :: Bool
- staleThresholdSecs :: Double
- metadata :: Maybe Value
- health :: WorkerHealth
- data WorkerHealth
- workerHealthFromText :: Text -> Either Text WorkerHealth
- arbiterWorkersTable :: SchemaName -> Text
- arbiterWorkersTableName :: Text
- createWorkersTableSQL :: SchemaName -> Text
- addClaimedByColumnSQL :: SchemaName -> TableName -> Text
- addCancelRequestedAtColumnSQL :: SchemaName -> TableName -> Text
- addArchiveForColumnSQL :: SchemaName -> TableName -> Text
Documentation
A row in the worker registry. One row per running worker pool.
Constructors
| WorkerRow | |
Fields
| |
Instances
Source #data WorkerHealth
Heartbeat-derived health of a worker. Independent of its paused flag.
Instances
| FromJSON WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker | |||||
| ToJSON WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker Methods #toJSON :: WorkerHealth -> Value #toEncoding :: WorkerHealth -> Encoding #toJSONList :: [WorkerHealth] -> Value #toEncodingList :: [WorkerHealth] -> Encoding #omitField :: WorkerHealth -> Bool | |||||
| Eq WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker | |||||
| Generic WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker Associated Types
| |||||
| Show WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker Methods #showsPrec :: Int -> WorkerHealth -> ShowS #show :: WorkerHealth -> String #showList :: [WorkerHealth] -> ShowS | |||||
| type Rep WorkerHealth Source # | |||||
Defined in Arbiter.Core.Worker type Rep WorkerHealth = D1 ('MetaData "WorkerHealth" "Arbiter.Core.Worker" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Live" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Stale" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Draining" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Source #workerHealthFromText :: Text -> Either Text WorkerHealth
Decode the health SQL token into a WorkerHealth.
Source #arbiterWorkersTable :: SchemaName -> Text
Qualified table name for the arbiter_workers table.
Source #arbiterWorkersTableName :: Text
Bare name of the workers table, for catalog lookups by relname.
Source #createWorkersTableSQL :: SchemaName -> Text
DDL for the arbiter_workers table.
Source #addClaimedByColumnSQL :: SchemaName -> TableName -> Text
Idempotent migration adding the claimed_by column to a queue's job and DLQ tables.
Source #addCancelRequestedAtColumnSQL :: SchemaName -> TableName -> Text
Idempotent migration adding the cancel_requested_at column to a queue's
job table, with a partial index backing the reaper's flagged-job sweep.
Source #addArchiveForColumnSQL :: SchemaName -> TableName -> Text
Idempotent migration adding the archive_for column to a queue's job and DLQ tables.