Commit 9edd6f78 authored by Tristan Cavelier's avatar Tristan Cavelier

adding repair option to replicaterevisionstorage (temporarily)

parent b0a00474
...@@ -255,6 +255,7 @@ jIO.addStorageType('replicaterevision', function (spec, my) { ...@@ -255,6 +255,7 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
option.conflicts = true; option.conflicts = true;
option.revs = true; option.revs = true;
option.revs_info = true; option.revs_info = true;
option.repair = false;
for (i = 0; i < priv.storage_list.length; i += 1) { for (i = 0; i < priv.storage_list.length; i += 1) {
// if the document is not loaded // if the document is not loaded
priv.send("get", i, doc, option, functions.dealResults(param)); priv.send("get", i, doc, option, functions.dealResults(param));
...@@ -626,9 +627,11 @@ jIO.addStorageType('replicaterevision', function (spec, my) { ...@@ -626,9 +627,11 @@ jIO.addStorageType('replicaterevision', function (spec, my) {
} }
} }
that.success(response); that.success(response);
if (command.getOption("repair") === true) {
setTimeout(function () { setTimeout(function () {
priv.repair({"_id": doc._id}, command.cloneOption(), true); priv.repair({"_id": doc._id}, command.cloneOption(), true);
}); });
}
}; };
functions.error_count = 0; functions.error_count = 0;
functions.error = function (err) { functions.error = function (err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment