MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / parseTimeoutEnv

Function parseTimeoutEnv

apps/web/src/routers/usage-analytics-router.ts:475–481  ·  view source on GitHub ↗
(envKey: string, fallback: number)

Source from the content-addressed store, hash-verified

473 return 'IFF(total_generation_time_ms IS NOT NULL AND usage_date >= DATEADD(day, -7, CURRENT_DATE), 1, 0)';
474}
475
476// ---------------------------------------------------------------------------
477// Bucket expression for timeseries / table grouping
478// ---------------------------------------------------------------------------
479
480/**
481 * Returns a SQL expression that formats the time column as a string bucket,
482 * matching the granularity the caller requested.
483 *
484 * Hourly → 'YYYY-MM-DD HH24:MI:SS' (matches what Postgres timestamp::text returns)

Callers 1

defaultTimeoutForScopeFunction · 0.70

Calls 1

getEnvVariableFunction · 0.90

Tested by

no test coverage detected