From cb101b6573e1429cb3324928e4913384c5f33e74 Mon Sep 17 00:00:00 2001 From: Jack Liao Date: Tue, 7 Jul 2020 19:09:47 +0800 Subject: [PATCH] close db when exit process --- src/gd.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gd.js b/src/gd.js index 6ab3e04..a7f16b3 100644 --- a/src/gd.js +++ b/src/gd.js @@ -54,6 +54,7 @@ handle_exit(() => { db.prepare('update task set status=? where id=?').run('interrupt', v.id) }) records.length && console.log(records.length, 'task interrupted') + db.close() }) async function gen_count_body ({ fid, type, update, service_account }) {