Skip to main content

Variable: HOST_DEFAULTS

const HOST_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​

readonly jobAbsoluteTimeoutMs: 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​

readonly jobHeartbeatIntervalMs: 60000 = 60_000

Job lease heartbeat interval (ms).

logPrefix​

readonly logPrefix: "[Host]" = "[Host]"

console.error prefix used when a caller does not supply one.

maxAttempts​

readonly maxAttempts: 3 = 3

Fallback max attempts when a job/queue doesn't specify one.

maxClaimsPerTick​

readonly maxClaimsPerTick: 10 = 10

Max pending runs to claim per maintenance tick.

maxOutboxFlushPerTick​

readonly maxOutboxFlushPerTick: 100 = 100

Max outbox events to flush per maintenance tick.

maxSuspendedChecksPerTick​

readonly maxSuspendedChecksPerTick: 10 = 10

Max suspended stages to check per maintenance tick.

staleLeaseThresholdMs​

readonly staleLeaseThresholdMs: 300000 = 300_000

Stale lease threshold (ms) past which a job's lease is reclaimed.

suspendFallbackMs​

readonly suspendFallbackMs: 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​

readonly versionDeferMs: 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​

readonly workerId: "worker" = "worker"

Worker id used when a caller does not supply one.

computeStuckThresholdMs()​

readonly computeStuckThresholdMs(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