castor-load
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -41,2 +41,3 @@ 'use strict'; | ||
self.options.delay = options.delay || undefined; | ||
self.options.writeConcern = options.writeConcern || undefined; | ||
self.options.maxFileSize = options.maxFileSize || undefined; | ||
@@ -43,0 +44,0 @@ self.options.directory = self.directory; // for tingodb |
@@ -32,2 +32,3 @@ 'use strict'; | ||
self.options.delay = options.delay || 1000; | ||
self.options.writeConcern = options.writeConcern || 0; | ||
self.options.synckey = options.synckey || null; | ||
@@ -65,3 +66,3 @@ self.dateSynchronised = new Date(); | ||
self.coll = coll; | ||
self.coll.ensureIndex({ fid: 1 }, {unique: true, dropDups:true, w: 1 }, function(err, indexName) { | ||
self.coll.ensureIndex({ fid: 1 }, {unique: true, dropDups:true, w: self.options.writeConcern }, function(err, indexName) { | ||
fn(err, self.coll, self.db); | ||
@@ -236,3 +237,3 @@ }) | ||
doc.dateSynchronised = self.dateSynchronised; | ||
collection.insert(doc, {w:-1}, next); | ||
collection.insert(doc, {w: self.options.writeConcern}, next); | ||
} | ||
@@ -239,0 +240,0 @@ }); |
{ | ||
"name": "castor-load", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"author": "Nicolas Thouvenin <nthouvenin@gmail.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [], |
38689
1110