Deterministic execution timeout policies
execution_timeout.RdCreate explicit elapsed-time budgets and execute analysis plans or registries with timeout handling, dependency propagation, retry integration, and auditable timeout metadata.
Usage
new_execution_timeout_policy(
default_seconds = Inf,
module_seconds = numeric(),
label = "no-timeout"
)
# S3 method for class 'PopgenVCFExecutionTimeoutPolicy'
print(x, ...)
execute_analysis_plan_with_timeouts(
analysis,
context,
registry,
plan,
engine = new_execution_engine(fail_fast = FALSE),
timeout_policy = new_execution_timeout_policy(),
retry_policy = new_execution_retry_policy()
)
execute_analysis_registry_with_timeouts(
analysis,
context,
registry,
selected = NULL,
engine = new_execution_engine(fail_fast = FALSE),
timeout_policy = new_execution_timeout_policy(),
retry_policy = new_execution_retry_policy()
)Arguments
- default_seconds
Default elapsed-time budget in seconds. Use
Inffor no timeout.- module_seconds
Optional uniquely named numeric vector of positive per-module budgets.
- label
Stable policy identifier recorded in execution metadata.
- x
A
PopgenVCFExecutionTimeoutPolicyobject.- ...
Unused.
- analysis
A
PopgenVCFAnalysisobject.- context
Runtime context shared by module runners.
- registry
A
PopgenVCFRegistryobject.- plan
A
PopgenVCFExecutionPlanobject.- engine
Execution engine.
- timeout_policy
A
PopgenVCFExecutionTimeoutPolicyobject.- retry_policy
A
PopgenVCFExecutionRetryPolicyobject.- selected
Optional module names.
Value
new_execution_timeout_policy() returns a
PopgenVCFExecutionTimeoutPolicy. The execution functions return the
normal execution result with timeout-aware final and attempt ledgers and timeout
policy metadata. The print method returns x invisibly.
Details
Timeouts are disabled by default. A timed-out module contributes no accepted
result or artifact, is recorded as timed_out, and blocks dependent modules
unless a bounded retry later completes successfully and passes the normal
validation contracts.
The budget is enforced with setTimeLimit, which R checks
only when control returns to the interpreter. It stops a module that is running
R-level code, but it cannot interrupt a single blocking call: a long-running
compiled routine (most of SNPRelate, adegenet and phangorn)
or a wait on an external process runs to completion however small the budget,
and is reported as timed out only afterwards, if at all (measured directly: one
compiled call ran 422 seconds under a 1-second budget). A budget is a guard
against runaway R-level work, not a hard wall-clock guarantee. The external
ancestry backends have their own, genuinely enforced limit
(timeout_seconds under analyses.admixture and
analyses.faststructure), which kills the child process; use a scheduler
or container limit where a hard bound on the whole run is required.