From 89876f7138950ed8849438a681a5ede3945dc00a Mon Sep 17 00:00:00 2001 From: prompt.ac/@jeffrey Date: Tue, 30 Jun 2026 21:33:44 +0000 Subject: [PATCH] crm: force exit after graph build so the oneshot timer can re-run The MongoDB driver keeps connection-pool handles open, so build-graph never exited after logging done — Node's event loop stayed alive, the oneshot oxigraph-sync unit hung in 'activating' for an hour, and every subsequent rebuild got coalesced (stale graph). process.exit(0) on success fixes it. --- crm/build-graph.mjs | 13 +++++++++---- 1 file(s) changed, 9 insertion(s)(+), 4 deletion(s)(-) diff --git a/crm/build-graph.mjs b/crm/build-graph.mjs --- a/crm/build-graph.mjs +++ b/crm/build-graph.mjs @@ -145,7 +145,12 @@ log(`✅ done in ${((Date.now() - t0) / 1000).toFixed(1)}s — ${triples} triples live`); } -main().catch((e) => { - console.error("❌ build-graph failed:", e); - process.exit(1); -}); +// Force exit on completion: the MongoDB driver keeps connection-pool handles +// open, which would otherwise leave Node's event loop alive forever and hang the +// oneshot systemd unit in "activating" (so the next rebuild can never start). +main() + .then(() => process.exit(0)) + .catch((e) => { + console.error("❌ build-graph failed:", e); + process.exit(1); + }); -- tangled.sh