Commit 060bb605 authored by Tristan Cavelier's avatar Tristan Cavelier

Fix bug: ConflictManagerStorage max_retry option was overriden

parent 253ebe82
...@@ -28,13 +28,11 @@ var newConflictManagerStorage = function ( spec, my ) { ...@@ -28,13 +28,11 @@ var newConflictManagerStorage = function ( spec, my ) {
priv.getDistantMetadata = function (command,path,success,error) { priv.getDistantMetadata = function (command,path,success,error) {
var cloned_option = command.cloneOption (); var cloned_option = command.cloneOption ();
cloned_option.metadata_only = false; cloned_option.metadata_only = false;
cloned_option.max_retry = command.getOption('max_retry') || 3;
that.addJob ('get',priv.secondstorage_spec,path,cloned_option, that.addJob ('get',priv.secondstorage_spec,path,cloned_option,
success, error); success, error);
}; };
priv.saveMetadataToDistant = function (command,path,content,success,error) { priv.saveMetadataToDistant = function (command,path,content,success,error) {
// max_retry:0 // inf
that.addJob ('put',priv.secondstorage_spec, that.addJob ('put',priv.secondstorage_spec,
{_id:path,content:JSON.stringify (content)}, {_id:path,content:JSON.stringify (content)},
command.cloneOption(),success,error); command.cloneOption(),success,error);
...@@ -52,7 +50,6 @@ var newConflictManagerStorage = function ( spec, my ) { ...@@ -52,7 +50,6 @@ var newConflictManagerStorage = function ( spec, my ) {
priv.deleteAFile = function (command,path,success,error) { priv.deleteAFile = function (command,path,success,error) {
var cloned_option = command.cloneOption(); var cloned_option = command.cloneOption();
cloned_option.max_retry = 0; // inf
that.addJob ('remove',priv.secondstorage_spec,{_id:path}, that.addJob ('remove',priv.secondstorage_spec,{_id:path},
command.cloneOption(), success, error); command.cloneOption(), success, error);
}; };
......
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