arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Job.Dedup

Contents

Description

Deduplication strategy carried by a job at enqueue.

Synopsis

Documentation

data DedupKeySource #

Deduplication strategy, checked on INSERT via ON CONFLICT on the dedup key.

Constructors

IgnoreDuplicate Text

Skip if the main queue table holds a job with this key (DO NOTHING). DLQ and archive rows do not conflict.

ReplaceDuplicate Text

Replace the main queue table's job with this key (DO UPDATE), unless it is in flight (claimed under a live lease), force-cancel-flagged, has a different parent, or has children. Children in the DLQ count.

Instances

Instances details
FromJSON DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

ToJSON DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

Eq DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

Generic DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

Associated Types

type Rep DedupKey 
Instance details

Defined in Arbiter.Core.Job.Dedup

type Rep DedupKey = D1 ('MetaData "DedupKey" "Arbiter.Core.Job.Dedup" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "IgnoreDuplicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ReplaceDuplicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
Show DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

type Rep DedupKey Source # 
Instance details

Defined in Arbiter.Core.Job.Dedup

type Rep DedupKey = D1 ('MetaData "DedupKey" "Arbiter.Core.Job.Dedup" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "IgnoreDuplicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ReplaceDuplicate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Internal

Internal to the arbiter packages. Not covered by the PVP.

dedupParts :: Maybe DedupKey -> (Maybe Text, Maybe Text)Source #

The dedup_key and dedup_strategy column values for a DedupKey.

dedupFromParts :: Maybe Text -> Maybe Text -> Maybe DedupKeySource #

The inverse of dedupParts. An unknown or absent strategy reads as ignore.

dedupStrategyText :: DedupKey -> TextSource #

The dedup_strategy text for a DedupKey.

isReplaceDuplicate :: Maybe DedupKey -> BoolSource #

Whether a job's dedup key replaces a duplicate.

dedupFromStrategy :: Text -> Maybe (Text -> DedupKey)Source #

The DedupKey constructor for a dedup_strategy text.