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

Function retentionDays

telemetry-worker/src/rollup.ts:52–55  ·  view source on GitHub ↗
(env: Env)

Source from the content-addressed store, hash-verified

50
51/** Configured retention, clamped to something sane; falls back to the default. */
52export function retentionDays(env: Env): number {
53 const raw = Number(env.RETENTION_DAYS);
54 return Number.isInteger(raw) && raw >= 1 && raw <= 3650 ? raw : DEFAULT_RETENTION_DAYS;
55}
56
57/** Oldest day kept: everything strictly before this is purged. */
58export function retentionCutoff(atMs: number, keepDays: number): string {

Callers 3

fetchFunction · 0.90
runNightlyFunction · 0.85
handleAdminRollupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected