arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Job.Status

Description

Status values derived from a job row by the queue status SQL.

Synopsis

Documentation

data JobStatusSource #

Effective job status. Arbiter derives status from the stored fields. The status SQL in Arbiter.Core.Sql.Jobs is its source of truth.

Constructors

Ready

Visible, with attempts left. It can still wait behind its group head or a full concurrency or rate-limit key.

InFlight

Claimed by a worker, with the lease still running.

Backoff

Unclaimed with an attempt used, waiting out a delay. A nacked retry is here.

Scheduled

No attempt used, delayed to a future time. A nacked first attempt is here.

Suspended

Not claimable until resumed, such as a rollup finalizer with children.

Throttled

Held by a rate limit until tokens refill.

Cancelled

Force-cancel-flagged, waiting for teardown.

Exhausted

Visible but out of attempts, waiting for the reaper's DLQ sweep.

Instances

Instances details
FromJSON JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

ToJSON JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

Eq JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

Bounded JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

Enum JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

Generic JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

Associated Types

type Rep JobStatus 
Instance details

Defined in Arbiter.Core.Job.Status

type Rep JobStatus = D1 ('MetaData "JobStatus" "Arbiter.Core.Job.Status" "arbiter-core-0.1.0.0-inplace" 'False) (((C1 ('MetaCons "Ready" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InFlight" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Backoff" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Scheduled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Suspended" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Throttled" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cancelled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Exhausted" 'PrefixI 'False) (U1 :: Type -> Type))))
Show JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

type Rep JobStatus Source # 
Instance details

Defined in Arbiter.Core.Job.Status

type Rep JobStatus = D1 ('MetaData "JobStatus" "Arbiter.Core.Job.Status" "arbiter-core-0.1.0.0-inplace" 'False) (((C1 ('MetaCons "Ready" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InFlight" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Backoff" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Scheduled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Suspended" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Throttled" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cancelled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Exhausted" 'PrefixI 'False) (U1 :: Type -> Type))))

jobStatusToText :: JobStatus -> TextSource #

The wire name for a status.

jobStatusFromText :: Text -> Either Text JobStatusSource #

Strict inverse of jobStatusToText. Unknown values are rejected.