Comparing version 0.7.3 to 0.8.0
@@ -10,3 +10,3 @@ var legacy = require('./legacy'), | ||
/** | ||
* @param {Number} wid templar-specific process id | ||
* @param {ClusterProcess} proc | ||
* @param {String} command | ||
@@ -17,3 +17,3 @@ * @param {Function} callback | ||
*/ | ||
setCallback : function(wid, command, callback, timeout) { | ||
setCallback : function(proc, command, callback, timeout) { | ||
var self = this, | ||
@@ -26,3 +26,3 @@ storage = self._storage; | ||
var callbackId = wid + '_' + self._counter++; | ||
var callbackId = proc.wid + '_' + self._counter++; | ||
@@ -34,2 +34,3 @@ storage[callbackId] = { | ||
storage[callbackId].callback( | ||
proc, | ||
LusterRPCCallbackError.createError( | ||
@@ -58,3 +59,3 @@ LusterRPCCallbackError.CODES.REMOTE_CALL_WITH_CALLBACK_TIMEOUT, | ||
legacy.setImmediate(function() { | ||
stored.callback(null, data); | ||
stored.callback(proc, null, data); | ||
}); | ||
@@ -61,0 +62,0 @@ this.removeCallback(callbackId); |
@@ -642,3 +642,3 @@ var cluster = require('cluster'), | ||
WorkerWrapper.prototype.remoteCallWithCallback = function(opts) { | ||
var callbackId = RPCCallback.setCallback(this.wid, opts.command, opts.callback, opts.timeout); | ||
var callbackId = RPCCallback.setCallback(this, opts.command, opts.callback, opts.timeout); | ||
@@ -645,0 +645,0 @@ this.remoteCall(opts.command, opts.data, callbackId); |
@@ -169,3 +169,3 @@ var cluster = require('cluster'), | ||
Worker.prototype.remoteCallWithCallback = function(opts) { | ||
var callbackId = RPCCallback.setCallback(this.wid, opts.command, opts.callback, opts.timeout); | ||
var callbackId = RPCCallback.setCallback(this, opts.command, opts.callback, opts.timeout); | ||
@@ -172,0 +172,0 @@ this.remoteCall(opts.command, opts.data, callbackId); |
{ | ||
"name" : "luster", | ||
"version" : "0.7.3", | ||
"version" : "0.8.0", | ||
"description" : "Node.js cluster wrapper", | ||
@@ -5,0 +5,0 @@ "main" : "./lib/luster.js", |
Sorry, the diff of this file is not supported yet
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
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
90797
2218
0