pomelo-sync
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -35,4 +35,5 @@ /** | ||
case 3: | ||
case 4: | ||
mergerKey = [arguments[0],arguments[1]].join(''); | ||
this.mergerMap[mergerKey] = {key:arguments[0],val:clone(arguments[2])}; | ||
this.mergerMap[mergerKey] = {key: arguments[0], val: clone(arguments[2]), cb: arguments[3]}; | ||
this.writeToAOF(arguments[0], [arguments[2]]); | ||
@@ -100,3 +101,3 @@ break; | ||
this.writeToAOF(arguments[0], [arguments[2]]); | ||
return this.rewriter.flush(arguments[0],arguments[2]); | ||
return this.rewriter.flush(arguments[0], arguments[2], arguments[3]); | ||
} else { | ||
@@ -103,0 +104,0 @@ this.log.error('invaild arguments,flush must have at least 3 arguments'); |
@@ -29,3 +29,3 @@ /** | ||
var entry = mergerMap[mergerKey]; | ||
self.tick(entry.key,entry.val); | ||
self.tick(entry.key, entry.val, entry.cb); | ||
delete mergerMap[mergerKey]; | ||
@@ -41,4 +41,4 @@ } | ||
*/ | ||
Rewriter.prototype.flush = function(key,val){ | ||
this.tick(key,val); | ||
Rewriter.prototype.flush = function(key, val, cb){ | ||
this.tick(key, val, cb); | ||
}; | ||
@@ -45,0 +45,0 @@ /* |
{ | ||
"name": "pomelo-sync", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"dependencies": { | ||
} | ||
} |
@@ -32,3 +32,4 @@ #data-sync | ||
var optKey = 'updateUser'; | ||
var mapping = {optKey:updateUer}; //key function mapping | ||
var mapping = {}; //key function mapping | ||
mapping[optKey]=updateUser; | ||
opt.mapping = mapping; | ||
@@ -35,0 +36,0 @@ opt.client = dbclient; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
58061
32
1269
76
1