Move bootSql import to top of server/index.ts
ESM hoists imports anyway but a mid-file `import` statement reads as a foot-gun on review. No behaviour change; rules out one variable while diagnosing a prod boot crash. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
98bcae6f31
commit
3ffca722e3
1 changed files with 1 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ import {
|
|||
handleDashboardServe, handleQaSignoff, handleBuildReport, handleReportDataset,
|
||||
handleRetryReport, handleCancelReport,
|
||||
} from './routes/reports.js';
|
||||
import { sql as bootSql } from './db/client.js';
|
||||
|
||||
assertComposeNameOrExit();
|
||||
|
||||
|
|
@ -192,7 +193,6 @@ const server = createServer(async (req, res) => {
|
|||
// killed the previous server (deploy, OOM, manual restart). Without this they
|
||||
// keep polling forever in the UI ("running for 14h") and the run/retry guard
|
||||
// thinks one is still in flight, blocking new triggers.
|
||||
import { sql as bootSql } from './db/client.js';
|
||||
async function sweepOrphans(): Promise<void> {
|
||||
try {
|
||||
const rows = await bootSql<Array<{ id: string }>>`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue