gearman-node-bda
Advanced tools
Comparing version 0.9.5 to 0.9.6
@@ -62,8 +62,8 @@ // Copyright 2013 The GearmaNode Library Authors. All Rights Reserved. | ||
// Table of Jobs submited by this client. | ||
// A Job is inserted after JOB_CREATED packet. | ||
// A Job is removed: | ||
// * a non-background job after WORK_COMPLETE | ||
// * a background job by call of Job#close() | ||
this.jobs = {}; | ||
// Table of Jobs submited by this client. | ||
// A Job is inserted after JOB_CREATED packet. | ||
// A Job is removed: | ||
// * a non-background job after WORK_COMPLETE | ||
// * a background job by call of Job#close() | ||
this.jobs = {}; | ||
@@ -70,0 +70,0 @@ // load balancing |
@@ -356,2 +356,3 @@ // Copyright 2013 The GearmaNode Library Authors. All Rights Reserved. | ||
JobServer.logger.log('debug', 'packet received/sent, type=%s', protocol.PACKET_CODES[packetType]); | ||
switch (packetType) { | ||
@@ -415,3 +416,2 @@ | ||
case protocol.PACKET_TYPES.NO_JOB: | ||
this.clientOrWorker._response(this, packetType, parsedPacket); | ||
@@ -418,0 +418,0 @@ break; |
@@ -156,9 +156,12 @@ // Copyright 2013 The GearmaNode Library Authors. All Rights Reserved. | ||
*/ | ||
Worker.prototype.resetAbilities = function() { | ||
var jobServer; | ||
for (var i = 0; i < this.jobServers.length; i ++) { // TODO iterate only servers without any previous error | ||
Worker.prototype.resetAbilities = function(callback) { | ||
var jobServer, len=this.jobServers.length; | ||
var timer = setTimeout(function(){callback(new Error("RESET_ABILITIES timeout!"));},5000); | ||
var check = function(){if(--len===0) { clearTimeout(timer); Worker.logger.log('debug','RESET_ABILITIES done'); callback(); } } | ||
Worker.logger.log('debug', 'RESET_ABILITIES on all servers...'); | ||
for (var i = 0; i < len; i ++) { // TODO iterate only servers without any previous error | ||
jobServer = this.jobServers[i]; | ||
jobServer.send(protocol.encodePacket(protocol.PACKET_TYPES.RESET_ABILITIES)); | ||
jobServer.send(protocol.encodePacket(protocol.PACKET_TYPES.RESET_ABILITIES), check); | ||
} | ||
Worker.logger.log('debug', 'RESET_ABILITIES on all servers'); | ||
} | ||
@@ -165,0 +168,0 @@ |
{ | ||
"name": "gearman-node-bda", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "Node.js library for the Gearman distributed job system with support for multiple servers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
108920
1877