mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: remove default db connection options
This commit is contained in:
1 file changed
+1
-4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user