(n: number)
| 1628 | // Eight days of machines, the window ending Oct 4 (counted on Oct 8). |
| 1629 | const END = '2026-10-04'; |
| 1630 | const back = (n: number): string => utcDay(Date.parse(`${END}T00:00:00Z`) - n * 24 * 60 * MINUTE); |
| 1631 | const add = (machine: string, days: number[], opts: { installed?: number; container?: boolean; ci?: boolean } = {}): void => { |
| 1632 | for (const n of days) { |
| 1633 | db.prepare('INSERT INTO machine_days (machine_id, day, prod, container) VALUES (?, ?, ?, ?)').run(machine, back(n), opts.ci ? 0n : 1n, opts.container ? 1n : 0n); |
no test coverage detected