close db when exit process

This commit is contained in:
Jack Liao 2020-07-07 19:09:47 +08:00
parent 9e85cfaaec
commit cb101b6573
1 changed files with 1 additions and 0 deletions

View File

@ -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 }) {