Improve info logging for globalThis object

This commit is contained in:
Konstantin Wohlwend 2026-07-02 16:52:27 -07:00
parent f312200801
commit c21fa2ee88

View File

@ -77,7 +77,7 @@ const bulldozerDb = declareBulldozerDatabase(
{ migrations: schema.migrations },
);
(globalThis as any).bulldozerDb = bulldozerDb;
console.log("Stored bulldozerDb in globalThis for pid " + process.pid);
console.log(`Stored bulldozerDb in globalThis for pid ${process.pid}. Run \`kill -USR1 ${process.pid} && node inspect 127.0.0.1:9229\` and then \`exec("globalThis.bulldozerDb")\` to inspect it.`);
await traceSpan("bulldozer-js.applyRemainingMigrations", async () => await bulldozerDb.applyRemainingMigrations());
function jsonResponse(body: unknown, init?: ResponseInit) {