This commit is contained in:
undefined committed 2020-08-06 18:11:00 +08:00
1 parent e8ba53e8ec
commit 03f8c767f0
4 files changed
+23 -9

No files matched your search

-7
View File
@@ -1,5 +1,4 @@
import mongodb from 'mongodb';
import MongoWatcher from 'mongodb-watcher';
import * as bus from './bus';
import options from '../options';
@@ -16,12 +15,6 @@ mongodb.MongoClient.connect(mongourl, { useNewUrlParser: true, useUnifiedTopolog
.then((Client) => {
db = Client.db(opts.name);
global.Hydro.service.db.db = db;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const watcher = new MongoWatcher(db, {
longCursorThreshold: 100,
largeInsertThreshold: 1024 * 30,
largeFetchThreshold: 1024 * 30,
});
bus.publish('system_database_connected', null);
});