query-swarm
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -65,3 +65,3 @@ 'use strict'; | ||
self.workers.splice.apply(self.workers, params); | ||
return concurrency = value; | ||
return (concurrency = value); | ||
} | ||
@@ -128,3 +128,3 @@ }; | ||
redis.set(self.id + ':lock', null, 'PX', self.options.lockTimeout + 1000, 'NX', function(err, result) { | ||
if(result === 0) | ||
if(result === null) | ||
return; | ||
@@ -134,3 +134,3 @@ | ||
redis.set(self.id + ':throttle', null, 'PX', self.throttle, 'NX', function(err, result) { | ||
if(result === 0) | ||
if(result === null) | ||
return; | ||
@@ -137,0 +137,0 @@ |
@@ -64,7 +64,7 @@ 'use strict'; | ||
// we're mid-job; gracefully exit when it's done | ||
return self.next = function(){ | ||
return (self.next = function(){ | ||
delete self.next; | ||
self.active = false; | ||
callback(); | ||
}; | ||
}); | ||
}; | ||
@@ -96,3 +96,3 @@ | ||
if(delay) | ||
return self.timeout = setTimeout(self.next.bind(self), delay, method); | ||
return (self.timeout = setTimeout(self.next.bind(self), delay, method)); | ||
@@ -99,0 +99,0 @@ return setImmediate(self.next.bind(self), method, false); |
{ | ||
"name": "query-swarm", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Safely distribute query-driven tasks over a swarm of parallel functions on a single process or across multiple processes/machines.", | ||
@@ -5,0 +5,0 @@ "keywords": "schedule, queue, task, job, worker, redis, distributed, async", |
@@ -19,3 +19,3 @@ 'use strict'; | ||
concurrency: 2 | ||
} | ||
}; | ||
@@ -115,3 +115,2 @@ describe('Start/Stop', function(){ | ||
describe('Deadletter', function(){ | ||
@@ -191,3 +190,2 @@ var q = 0; | ||
}); | ||
}); | ||
@@ -207,3 +205,3 @@ | ||
function(task, callback) { | ||
assert.ok(false, 'the worker should never be run.') | ||
assert.ok(false, 'the worker should never be run.'); | ||
}, | ||
@@ -210,0 +208,0 @@ opts |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
618380
13
0