Skip to content

Commit 6f8e9af

Browse files
committed
workflow: do not retry AM poll activities
This commit updates the poller activities so they convert errors that escape the backoff retry into workflow NRE (non-retryable) errors. When these are returned, they escape the retry policy attached to the activities. E.g., we want the activity to give up right away when Archivematica returns the "FAILED" status for a package.
1 parent c528595 commit 6f8e9af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/workflow/poll_ingest_activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (a *PollIngestActivity) Execute(ctx context.Context, tinfo *TransferInfo) (
3333

3434
err = pipeline.IngestStatus(ctx, amc, tinfo.SIPID)
3535
if errors.Is(err, pipeline.ErrStatusNonRetryable) {
36-
return backoff.Permanent(err)
36+
return backoff.Permanent(nonRetryableError(err))
3737
}
3838

3939
return err

internal/workflow/poll_transfer_activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (a *PollTransferActivity) Execute(ctx context.Context, tinfo *TransferInfo)
3434

3535
sipID, err = pipeline.TransferStatus(ctx, amc, tinfo.TransferID)
3636
if errors.Is(err, pipeline.ErrStatusNonRetryable) {
37-
return backoff.Permanent(err)
37+
return backoff.Permanent(nonRetryableError(err))
3838
}
3939

4040
return err

0 commit comments

Comments
 (0)