|
|
@ -696,6 +696,7 @@ async function initialize({ configDir, key, messages }) {
|
|
|
|
|
|
|
|
|
|
|
|
filePath = path.join(dbDir, 'db.sqlite');
|
|
|
|
filePath = path.join(dbDir, 'db.sqlite');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
const sqlInstance = await openDatabase(filePath);
|
|
|
|
const sqlInstance = await openDatabase(filePath);
|
|
|
|
const promisified = promisify(sqlInstance);
|
|
|
|
const promisified = promisify(sqlInstance);
|
|
|
|
|
|
|
|
|
|
|
@ -714,7 +715,6 @@ async function initialize({ configDir, key, messages }) {
|
|
|
|
db = promisified;
|
|
|
|
db = promisified;
|
|
|
|
|
|
|
|
|
|
|
|
// test database
|
|
|
|
// test database
|
|
|
|
try {
|
|
|
|
|
|
|
|
await getMessageCount();
|
|
|
|
await getMessageCount();
|
|
|
|
} catch (error) {
|
|
|
|
} catch (error) {
|
|
|
|
console.log('Database startup error:', error.stack);
|
|
|
|
console.log('Database startup error:', error.stack);
|
|
|
|