couchdb-worker
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -242,3 +242,3 @@ /* | ||
// reset on errors | ||
if (this._checkResponse(error, resp, data, 'commit doc')) return this._reset(newDoc); | ||
if (this._checkResponse(error, resp, data, 'commit doc')) return this._reset(doc); | ||
@@ -265,6 +265,6 @@ // update doc's rev | ||
// TODO: retry on errors | ||
if (this._checkResponse(error, resp, data, 'fetch doc')) return this._nextChange(); | ||
if (this._checkResponse(error, resp, newDoc, 'fetch doc')) return this._nextChange(); | ||
// reset the worker state | ||
if (doc.worker_status) delete doc.worker_status[this.name]; | ||
if (newDoc.worker_status) delete newDoc.worker_status[this.name]; | ||
@@ -277,3 +277,3 @@ // save doc | ||
method: 'PUT', | ||
body: JSON.stringify(doc), | ||
body: JSON.stringify(newDoc), | ||
json: true | ||
@@ -283,3 +283,3 @@ }, function(error, resp, data) { | ||
// TODO: do not try in that endless loop | ||
if (this._checkResponse(error, resp, data, 'commit doc')) return this._reset(doc); | ||
if (this._checkResponse(error, resp, data, 'commit doc')) return this._reset(newDoc); | ||
@@ -286,0 +286,0 @@ this._log('reset: ' + doc._id); |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"dependencies": { | ||
@@ -12,0 +12,0 @@ "request": "*", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
27544
0