File tree 1 file changed +13
-4
lines changed 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,13 @@ exports.initialize = function initializeDataSource(dataSource, callback) {
105
105
106
106
s . safe = s . safe !== false ;
107
107
s . w = s . w || 1 ;
108
+ s . writeConcern = s . writeConcern || {
109
+ w : s . w ,
110
+ wtimeout : s . wtimeout || null ,
111
+ j : s . j || null ,
112
+ journal : s . journal || null ,
113
+ fsync : s . fsync || null ,
114
+ } ;
108
115
s . url = s . url || generateMongoDBURL ( s ) ;
109
116
s . useNewUrlParser = s . useNewUrlParser !== false ;
110
117
s . useUnifiedTopology = s . useUnifiedTopology !== false ;
@@ -251,9 +258,6 @@ MongoDB.prototype.connect = function(callback) {
251
258
'acceptableLatencyMS' ,
252
259
'connectWithNoPrimary' ,
253
260
'authSource' ,
254
- 'w' ,
255
- 'wtimeout' ,
256
- 'j' ,
257
261
'forceServerObjectId' ,
258
262
'serializeFunctions' ,
259
263
'ignoreUndefined' ,
@@ -278,13 +282,13 @@ MongoDB.prototype.connect = function(callback) {
278
282
'password' ,
279
283
'authMechanism' ,
280
284
'compression' ,
281
- 'fsync' ,
282
285
'readPreferenceTags' ,
283
286
'numberOfRetries' ,
284
287
'auto_reconnect' ,
285
288
'minSize' ,
286
289
'useNewUrlParser' ,
287
290
'useUnifiedTopology' ,
291
+ 'writeConcern' ,
288
292
// Ignored options
289
293
'native_parser' ,
290
294
// Legacy options
@@ -293,6 +297,11 @@ MongoDB.prototype.connect = function(callback) {
293
297
'replSet' ,
294
298
'mongos' ,
295
299
'db' ,
300
+ 'w' ,
301
+ 'wtimeout' ,
302
+ 'j' ,
303
+ 'journal' ,
304
+ 'fsync' ,
296
305
] ;
297
306
298
307
const lbOptions = Object . keys ( self . settings ) ;
You can’t perform that action at this time.
0 commit comments