Variable: HOST_DEFAULTS
constHOST_DEFAULTS:object
Defined in: packages/workflow-engine/src/kernel/helpers/host-support.ts:29
Default tuning knobs shared by every host implementation.
Type Declaration
jobAbsoluteTimeoutMs
readonlyjobAbsoluteTimeoutMs:3600000=3_600_000
Absolute cap (ms) on one job claim, measured from the claim itself and so unaffected by heartbeating: twelve times the default stale-lease threshold, i.e. one hour. The heartbeat tier alone cannot recover a worker that is alive but wedged, because such a worker keeps heartbeating; this is the backstop that always fires. A stage that legitimately runs longer than an hour must raise it; 0 disables the tier entirely and restores the heartbeat-only behaviour.
jobHeartbeatIntervalMs
readonlyjobHeartbeatIntervalMs:60000=60_000
Job lease heartbeat interval (ms).
logPrefix
readonlylogPrefix:"[Host]"="[Host]"
console.error prefix used when a caller does not supply one.
maxAttempts
readonlymaxAttempts:3=3
Fallback max attempts when a job/queue doesn't specify one.
maxClaimsPerTick
readonlymaxClaimsPerTick:10=10
Max pending runs to claim per maintenance tick.
maxOutboxFlushPerTick
readonlymaxOutboxFlushPerTick:100=100
Max outbox events to flush per maintenance tick.
maxSuspendedChecksPerTick
readonlymaxSuspendedChecksPerTick:10=10
Max suspended stages to check per maintenance tick.
staleLeaseThresholdMs
readonlystaleLeaseThresholdMs:300000=300_000
Stale lease threshold (ms) past which a job's lease is reclaimed.
suspendFallbackMs
readonlysuspendFallbackMs:60000=60_000
Fallback delay (ms), added to "now", for a suspended job's next poll
when the stage result didn't provide its own nextPollAt.
versionDeferMs
readonlyversionDeferMs:30000=30_000
Delay (ms) before a job declined for a definition-version mismatch is offered again. A mismatch clears when a deploy finishes, not on the next tick, so re-delivering sooner is pure churn against a database every host in the fleet is polling.
workerId
readonlyworkerId:"worker"="worker"
Worker id used when a caller does not supply one.
computeStuckThresholdMs()
readonlycomputeStuckThresholdMs(staleLeaseThresholdMs):number
Stuck-run threshold for run.reapStuck: at least 3x the stale-lease
threshold — so a run isn't reaped out from under a legitimately
long-running stage that's still heartbeating — floored at 5 minutes.
Parameters
staleLeaseThresholdMs
number
Returns
number