MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / resolveParseTimeoutMs

Function resolveParseTimeoutMs

src/extraction/parse-pool.ts:126–132  ·  view source on GitHub ↗
(envVal: string | undefined)

Source from the content-addressed store, hash-verified

124 * non-numeric / non-positive value falls back to the default (10s).
125 */
126export function resolveParseTimeoutMs(envVal: string | undefined): number {
127 if (envVal !== undefined && envVal !== '') {
128 const n = Number(envVal);
129 if (Number.isFinite(n) && n > 0) return Math.floor(n);
130 }
131 return DEFAULT_PARSE_TIMEOUT_MS;
132}
133
134/**
135 * Per-file soft timeout. Size scaling helps legitimate large sources, but an

Callers 2

index.tsFile · 0.90
parse-pool.test.tsFile · 0.90

Calls 1

NumberInterface · 0.85

Tested by

no test coverage detected