mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-15 18:54:45 -04:00
Fixed ueberdb2 build. (#6533)
This commit is contained in:
parent
2f41b1b278
commit
8a1a03eca1
4 changed files with 336 additions and 181 deletions
|
@ -21,7 +21,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import ueberDB from 'ueberdb2';
|
||||
import {Database} from 'ueberdb2';
|
||||
const settings = require('../utils/Settings');
|
||||
import log4js from 'log4js';
|
||||
const stats = require('../stats')
|
||||
|
@ -37,7 +37,7 @@ exports.db = null;
|
|||
* Initializes the database with the settings provided by the settings module
|
||||
*/
|
||||
exports.init = async () => {
|
||||
exports.db = new ueberDB.Database(settings.dbType, settings.dbSettings, null, logger);
|
||||
exports.db = new Database(settings.dbType, settings.dbSettings, null, logger);
|
||||
await exports.db.init();
|
||||
if (exports.db.metrics != null) {
|
||||
for (const [metric, value] of Object.entries(exports.db.metrics)) {
|
||||
|
|
|
@ -26,7 +26,7 @@ const db = require('../db/DB');
|
|||
const hooks = require('../../static/js/pluginfw/hooks');
|
||||
import log4js from 'log4js';
|
||||
const supportedElems = require('../../static/js/contentcollector').supportedElems;
|
||||
import ueberdb from 'ueberdb2';
|
||||
import {Database} from 'ueberdb2';
|
||||
|
||||
const logger = log4js.getLogger('ImportEtherpad');
|
||||
|
||||
|
@ -56,7 +56,7 @@ exports.setPadRaw = async (padId: string, r: string, authorId = '') => {
|
|||
|
||||
const data = new Map();
|
||||
const existingAuthors = new Set();
|
||||
const padDb = new ueberdb.Database('memory', {data});
|
||||
const padDb = new Database('memory', {data});
|
||||
await padDb.init();
|
||||
try {
|
||||
const processRecord = async (key:string, value: null|{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue