mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Fixed bin scripts.
This commit is contained in:
parent
3ccc3e1324
commit
88862f0246
11 changed files with 22 additions and 6 deletions
|
@ -6,7 +6,8 @@ import util from "node:util";
|
|||
const fs = require('fs');
|
||||
import log4js from 'log4js';
|
||||
import readline from 'readline';
|
||||
import ueberDB from "ueberdb2";
|
||||
import {Database} from "ueberdb2";
|
||||
import process from "node:process";
|
||||
|
||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
||||
process.on('unhandledRejection', (err) => { throw err; });
|
||||
|
@ -56,7 +57,7 @@ const unescape = (val: string) => {
|
|||
writeInterval: 100,
|
||||
json: false, // data is already json encoded
|
||||
};
|
||||
const db = new ueberDB.Database( // eslint-disable-line new-cap
|
||||
const db = new Database( // eslint-disable-line new-cap
|
||||
settings.dbType,
|
||||
settings.dbSettings,
|
||||
dbWrapperSettings,
|
||||
|
@ -96,6 +97,8 @@ const unescape = (val: string) => {
|
|||
'depended on dbms this may take some time..\n');
|
||||
|
||||
const closeDB = util.promisify(db.close.bind(db));
|
||||
// @ts-ignore
|
||||
await closeDB(null);
|
||||
log(`finished, imported ${keyNo} keys.`);
|
||||
process.exit(0)
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue