Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gearman-node-bda

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gearman-node-bda - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

19

lib/gearmanode/worker.js

@@ -71,3 +71,3 @@ // Copyright 2013 The GearmaNode Library Authors. All Rights Reserved.

this.functions = {};
this.readyReset = false;
events.EventEmitter.call(this);

@@ -160,6 +160,6 @@ Worker.logger.log('info', 'worker initialized with %d job server(s)', this.jobServers.length);

Worker.prototype.resetAbilities = function(callback) {
var jobServer, len=this.jobServers.length;
var jobServer, len=this.jobServers.length, cbCount=len;
callback=callback||function(){};
var timer = setTimeout(function(){callback(new Error("RESET_ABILITIES timeout!"));},10000);
var check = function(){if(--len===0) { clearTimeout(timer); Worker.logger.log('debug','RESET_ABILITIES done'); callback(); } }
var timer = setTimeout(function(){callback(new Error("RESET_ABILITIES timeout!"));},15000);
var check = function(){if(--cbCount===0) { clearTimeout(timer); Worker.logger.log('debug','RESET_ABILITIES done'); callback(); } }

@@ -307,7 +307,7 @@ Worker.logger.log('debug', 'RESET_ABILITIES on all servers...');

Worker.prototype.grabJob = function (numberOfJob) {
var i=0,j=0;
var i,j
numberOfJob=numberOfJob?numberOfJob:1;
for(i=0;i<numberOfJob;i++){
for (j = 0; i < this.jobServers.length; i ++) {
this.jobServers[i].send(protocol.encodePacket(protocol.PACKET_TYPES.GRAB_JOB));
for (j = 0; j < this.jobServers.length; j ++) {
this.jobServers[j].send(protocol.encodePacket(protocol.PACKET_TYPES.GRAB_JOB));
}

@@ -429,5 +429,8 @@ }

jobServer.send(protocol.encodePacket(packetType, packetData));
jobServer.send(protocol.encodePacket(protocol.PACKET_TYPES.GRAB_JOB));
if(!this.clientOrWorker.readyReset)// ensure the worker won't exit
jobServer.send(protocol.encodePacket(protocol.PACKET_TYPES.GRAB_JOB));
this.close();
}
}, Job.prototype);
{
"name": "gearman-node-bda",
"version": "0.10.0",
"version": "0.10.1",
"description": "Node.js library for the Gearman distributed job system with support for multiple servers",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc