From 75799493c0af189545909484adf87b65af99f165 Mon Sep 17 00:00:00 2001 From: oleg Date: Tue, 7 Jul 2015 23:26:49 +0300 Subject: [PATCH] fix db concurrency --- db.js | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/db.js b/db.js index a1fd310..63fa5fb 100644 --- a/db.js +++ b/db.js @@ -86,14 +86,15 @@ nlevel.DocsSection.prototype._beforePut = function(docs, callback) { self.beforePut(docs, this.slot()); }, - function() { - self._beforePutInProgress = false; - this.pass(null); - }, callback ); }; +nlevel.DocsSection.prototype._afterPut = function(docs, callback) { + this._beforePutInProgress = false; + callback(); +}; + function pickProjectName(build) { return build.project.name; } diff --git a/package.json b/package.json index 75ceab9..83af3df 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "nci": "bin/nci" }, "scripts": { - "test": "mocha --bail --reporter=spec test/index --timeout 3000", + "test": "mocha --bail --reporter=spec test/index --timeout 4000", "dev": "gulp", "sync": "npm install && npm prune && bower install && bower prune" },