|
|
|
@ -29,7 +29,6 @@ Workers.initializeValidationWorkers = function (Env) { |
|
|
|
var initWorker = function (worker) { |
|
|
|
worker.on('message', function (res) { |
|
|
|
if (!res || !res.txid) { return; } |
|
|
|
//console.log(+new Date(), "Received verification response");
|
|
|
|
response.handle(res.txid, [res.error, res.value]); |
|
|
|
}); |
|
|
|
|
|
|
|
@ -127,7 +126,6 @@ Workers.initializeIndexWorkers = function (Env, config, _cb) { |
|
|
|
|
|
|
|
var workerIndex = 0; |
|
|
|
var sendCommand = function (msg, _cb) { |
|
|
|
console.log("SEND_COMMAND"); |
|
|
|
var cb = Util.once(Util.mkAsync(_cb)); |
|
|
|
|
|
|
|
workerIndex = (workerIndex + 1) % workers.length; |
|
|
|
@ -154,7 +152,6 @@ Workers.initializeIndexWorkers = function (Env, config, _cb) { |
|
|
|
}; |
|
|
|
|
|
|
|
const initWorker = function (worker, cb) { |
|
|
|
//console.log("initializing index worker");
|
|
|
|
const txid = guid(); |
|
|
|
|
|
|
|
const state = { |
|
|
|
@ -164,7 +161,6 @@ Workers.initializeIndexWorkers = function (Env, config, _cb) { |
|
|
|
|
|
|
|
response.expect(txid, function (err) { |
|
|
|
if (err) { return void cb(err); } |
|
|
|
//console.log("worker initialized");
|
|
|
|
workers.push(state); |
|
|
|
cb(void 0, state); |
|
|
|
}, 15000); |
|
|
|
|