downgrade sqlite3 library which has issues with electron build

This commit is contained in:
zadam
2020-05-03 21:27:24 +02:00
parent 227c3e4dcc
commit 647790885d
5 changed files with 59 additions and 70 deletions

View File

@@ -13,16 +13,11 @@ const port = require('./port');
const Option = require('../entities/option');
const TaskContext = require('./task_context.js');
async function createConnection() {
return await sqlite.open({
const dbConnection = new Promise(async (resolve, reject) => {
const db = await sqlite.open({
filename: dataDir.DOCUMENT_PATH,
driver: sqlite3.Database
});
}
const dbConnection = new Promise(async (resolve, reject) => {
// no need to create new connection now since DB stays the same all the time
const db = await createConnection();
db.run('PRAGMA journal_mode = WAL;');