arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Worker

Description

Types and DDL for the arbiter_workers table.

Synopsis

Documentation

Source #data WorkerRow

A row in the worker registry. One row per running worker pool.

Instances

Instances details
FromJSON WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

ToJSON WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Eq WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Generic WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Show WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Source #data WorkerHealth

Heartbeat-derived health of a worker. Independent of its paused flag.

Constructors

Live 
Stale 
Draining 

Instances

Instances details
FromJSON WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

ToJSON WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Eq WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Generic WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Associated Types

type Rep WorkerHealth 
Instance details

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)))
Show WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerHealth Source # 
Instance details

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.