Add explicit process exit to prevent hanging in migrations script

This commit is contained in:
Owen
2026-09-10 16:00:19 -04:00
parent 738a790b3d
commit e22aa79f1b
+6
View File
@@ -66,6 +66,12 @@ const migrations = [
await run();
// The pg Pool is created with allowExitOnIdle: false (see poolConfig.ts) so
// its sockets keep the event loop alive even when idle. Without an explicit
// exit here, this one-shot script would hang until the pool's
// idleTimeoutMillis elapses before the process could terminate.
process.exit(0);
async function run() {
// run the migrations
await runMigrations();