| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
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
- data JobOutcome
- data RetryLeg
- mirrorLatest :: Maybe Version -> [Version] -> Version -> Version
- outcomeOfAdmission :: MirrorJob -> ArtifactAdmission -> Either JobOutcome MirrorArtifact
- outcomeOfFetchFault :: RetryLeg -> (FetchFault -> Text) -> FetchFault -> JobOutcome
- processJob :: MirrorJob -> WorkerM JobOutcome
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
| Show JobOutcome Source # | |
Defined in Ecluse.Core.Worker.Job Methods showsPrec :: Int -> JobOutcome -> ShowS # show :: JobOutcome -> String # showList :: [JobOutcome] -> ShowS # | |
| Eq JobOutcome Source # | |
Defined in Ecluse.Core.Worker.Job | |
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. |
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.