From bf209ddad38ce12f446093092c7f5899a6d7144b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 29 Jan 2021 17:19:40 -0500 Subject: [PATCH] bin/rebuildPad.js: Close the database when done This prevents loss of data due to unflushed writes. --- bin/rebuildPad.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/rebuildPad.js b/bin/rebuildPad.js index f5043b85b..f541a4ce4 100644 --- a/bin/rebuildPad.js +++ b/bin/rebuildPad.js @@ -91,5 +91,6 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`; console.log(`Created: Source Pad: pad:${newPadId}`); await newPad.saveToDatabase(); + await db.shutdown(); console.info('finished'); })();