ReferenceApplication API
Defaults
Read the shared defaults used by Runlane's application APIs.
contractDefaults from @runlane/core is the source of shared runtime defaults. Read it when your application needs to reuse a default. Do not copy a fallback value into your own configuration.
import { contractDefaults } from '@runlane/core'
const { dispatch, environment, idempotency, lease, maintenance, pagination, pruning, retry, sort, worker } =
contractDefaults
console.log(
JSON.stringify(
{ dispatch, environment, idempotency, lease, maintenance, pagination, pruning, retry, sort, worker },
null,
2,
),
)The current values are shown below. They are generated from contractDefaults; a documentation check compares this block with the exported values.
{
"dispatch": {
"onTrigger": "eager"
},
"environment": {
"name": "default"
},
"idempotency": {
"defaultTTL": "30d"
},
"lease": {
"duration": "5m"
},
"maintenance": {
"cancellationFinalizationLimit": 100,
"clockSkewTolerance": "5s",
"deliveryRequestLimit": 100,
"outboxClaimLimit": 100,
"outboxRetryDelay": "30s",
"scheduleMaterializationLimit": 100,
"services": {
"interval": "1s",
"maximumFailureBackoff": "1m",
"minimumLeaseDuration": "1m"
},
"timeoutFinalizationLimit": 100,
"waitTokenResumeLimit": 100,
"waitTokenTimeoutLimit": 100
},
"pagination": {
"defaultLimit": 50,
"maxLimit": 500
},
"pruning": {
"batchLimit": 500
},
"retry": {
"backoff": "30s"
},
"sort": {
"runEvents": {
"direction": "desc",
"field": "occurred_at"
},
"runs": {
"direction": "desc",
"field": "created_at"
},
"tokens": {
"direction": "desc"
}
},
"worker": {
"concurrency": 1
}
}| Group | Where it applies |
|---|---|
dispatch | Publishing policy after a trigger. |
environment | Default namespace for a runtime. |
idempotency | Terminal retention for a run's idempotency key when no TTL is supplied. |
lease | Worker ownership duration between renewals. |
maintenance | Limits for each pass, service timing, and recovery delays. |
pagination | Default and maximum page sizes for operator lists. |
pruning | Batch size for retention cleanup. |
retry | Delay used when a task has a retry policy but omits backoff. |
sort | Default order for run, event, and token lists. |
worker | Parallel attempts within one delivery worker. |
Settings without an automatic policy
- Omitting task
retrydisables automatic retries. Setting it requiresmaxAttempts; there is no default attempt budget. - Omitting
maxAttemptDurationfrom both the task and execution options leaves the attempt without a deadline. Its lease still applies. - Omitting
queue.concurrencyLimitleaves that queue unbounded. A worker's local concurrency setting still applies. - Omitting token
timeoutleaves that token without a deadline. - Omitting a token's
idempotencyKeyTTLkeeps terminal key ownership until the token is pruned. Run keys usecontractDefaults.idempotency.defaultTTLwhen no TTL is supplied.
Provider-specific limits belong to the selected lane or adapter. See choose a lane and the provider's configuration guide.