(envVal: string | undefined)
| 59 | |
| 60 | /** Resolve the heal threshold from the env override (MB); invalid ⇒ 64 MB. */ |
| 61 | export function resolveWalHealBytes(envVal: string | undefined): number { |
| 62 | if (envVal !== undefined && envVal !== '') { |
| 63 | const n = Number(envVal); |
| 64 | if (Number.isFinite(n) && n > 0) return Math.floor(n * 1024 * 1024); |
| 65 | } |
| 66 | return 64 * 1024 * 1024; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Database connection wrapper with lifecycle management |
no outgoing calls
no test coverage detected