core: remove default db connection options

This commit is contained in:
undefined committed 2023-12-03 02:27:22 +08:00
1 parent c56966e8bd
commit a6b9d154ca
1 file changed
+1 -4
+1 -4
View File
@@ -44,10 +44,7 @@ class MongoService {
mongourl = mongod.getUri();
}
this.opts = opts;
this.client = await MongoClient.connect(mongourl, {
readPreference: 'nearest',
writeConcern: new WriteConcern('majority'),
});
this.client = await MongoClient.connect(mongourl);
this.db = this.client.db(opts.name || 'hydro');
await bus.parallel('database/connect', this.db);
setInterval(() => this.fixExpireAfter(), Time.hour);