ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Worker.Job

Description

Decide mirror admission, preparation, integrity, and publication outcomes. The lease controller owns the receipt, and Ecluse.Core.Worker.Realise applies queue outcomes.

Synopsis

Documentation

data JobOutcome Source #

A mirror outcome determines acknowledgement, redelivery, or dead-letter handling.

Constructors

Succeeded

Completion proof covers every expected file and companion, including idempotent redelivery.

Dropped Text

A non-retryable rejection. The worker alarms and acknowledges the message.

SourceUnavailable Text

The source version object is unavailable. Retire the job separately from a policy denial.

DeadLettered Text

A terminal fault sent to the dead-letter handler instead of silently deleted.

Retried RetryLeg Text

A transient fault leaves the message unacknowledged and retains the failed leg.

Instances

Instances details
Show JobOutcome Source # 
Instance details

Defined in Ecluse.Core.Worker.Job

Eq JobOutcome Source # 
Instance details

Defined in Ecluse.Core.Worker.Job

data RetryLeg Source #

The failed leg determines whether the worker resets queue visibility.

Constructors

BeforePublish

A failure before publication keeps the lease until redelivery.

AfterPublish

A transient publication failure releases the message for immediate redelivery.

Instances

Instances details
Show RetryLeg Source # 
Instance details

Defined in Ecluse.Core.Worker.Job

Eq RetryLeg Source # 
Instance details

Defined in Ecluse.Core.Worker.Job

mirrorLatest :: Maybe Version -> [Version] -> Version -> Version Source #

Choose the mirror latest tag from the public tag and post-write inventory, which includes the published version.

outcomeOfAdmission :: MirrorJob -> ArtifactAdmission -> Either JobOutcome MirrorArtifact Source #

Project admission to publication or a queue outcome. admissionTransience determines retry versus drop.

outcomeOfFetchFault :: RetryLeg -> (FetchFault -> Text) -> FetchFault -> JobOutcome Source #

Classify fetch and publication faults through one retry-versus-drop table.

processJob :: MirrorJob -> WorkerM JobOutcome Source #

Recheck current policy before publishing because queue delays are unbounded.