mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-23 11:16:10 +02:00
* Fix major issue with SQLite transactions + aync code causing collisions
This commit is contained in:
parent
68247d87e8
commit
1e250f06d9
8 changed files with 116 additions and 122 deletions
|
@ -3,7 +3,10 @@
|
|||
|
||||
// ENiGMA½
|
||||
const MenuModule = require('../core/menu_module.js').MenuModule;
|
||||
const getModDatabasePath = require('../core/database.js').getModDatabasePath;
|
||||
const {
|
||||
getModDatabasePath,
|
||||
getTransactionDatabase
|
||||
} = require('../core/database.js').getModDatabasePath;
|
||||
const ViewController = require('../core/view_controller.js').ViewController;
|
||||
const theme = require('../core/theme.js');
|
||||
const ansi = require('../core/ansi_term.js');
|
||||
|
@ -263,12 +266,12 @@ exports.getModule = class OnelinerzModule extends MenuModule {
|
|||
async.series(
|
||||
[
|
||||
function openDatabase(callback) {
|
||||
self.db = new sqlite3.Database(
|
||||
self.db = getTransactionDatabase(new sqlite3.Database(
|
||||
getModDatabasePath(exports.moduleInfo),
|
||||
err => {
|
||||
return callback(err);
|
||||
}
|
||||
);
|
||||
));
|
||||
},
|
||||
function createTables(callback) {
|
||||
self.db.run(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue