Skip to contents

Create bounded retry policies and execute analysis plans or registries while preserving validated outputs and retaining a complete module-attempt ledger.

Usage

new_execution_retry_policy(
  max_attempts = 1L,
  retryable = function(module, error_message, attempt, ledger) FALSE,
  backoff_seconds = 0,
  label = "no-retry"
)

# S3 method for class 'PopgenVCFExecutionRetryPolicy'
print(x, ...)

execute_analysis_plan_with_retries(
  analysis,
  context,
  registry,
  plan,
  engine = new_execution_engine(fail_fast = FALSE),
  retry_policy = new_execution_retry_policy()
)

execute_analysis_registry_with_retries(
  analysis,
  context,
  registry,
  selected = NULL,
  engine = new_execution_engine(fail_fast = FALSE),
  retry_policy = new_execution_retry_policy()
)

Arguments

max_attempts

Maximum number of executions for a module, including the initial attempt.

retryable

Function receiving module, error_message, attempt, and ledger; it must return one non-missing logical value.

backoff_seconds

One non-negative delay or one delay per retry.

label

Stable policy identifier recorded in execution metadata.

x

A retry-policy object.

...

Unused.

analysis

A PopgenVCFAnalysis object.

context

Runtime context shared by module runners.

registry

A PopgenVCFRegistry object.

plan

A PopgenVCFExecutionPlan object.

engine

Execution engine. Retry attempts are evaluated with fail-fast disabled.

retry_policy

A PopgenVCFExecutionRetryPolicy object.

selected

Optional module names.

Value

new_execution_retry_policy() returns a PopgenVCFExecutionRetryPolicy. The execution functions return the normal execution result augmented with attempt_execution, final attempt counts, recovery flags, and retry metadata.

Details

A retry proceeds only when every failure from the preceding attempt is explicitly classified as retryable. Modules whose outputs passed the standard validation contract are removed from subsequent plans. Failed or unvalidated outputs are never reused.