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

hive-dev

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hive-dev - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

24

lib/defaults/general.js

@@ -46,3 +46,3 @@ /**

min: 1,
max: 2
max: 1
},

@@ -52,22 +52,22 @@ {

scale: 0,
min: 2,
max: 4
min: 1,
max: 2
},
{
name: 'default',
scale: 1,
min: 3,
max: 6
scale: 0,
min: 1,
max: 3
},
{
name: 'high',
scale: 2,
min: 4,
max: 8
scale: 0,
min: 2,
max: 4
},
{
name: 'highest',
scale: 3,
min: 5,
max: 10
scale: 0,
min: 3,
max: 5
}

@@ -74,0 +74,0 @@ ],

@@ -52,8 +52,11 @@ /**

var updateKey = function updateKey(key, per, count, callback) {
_this.redis.pipeline([
['hmset', key, 'timestamp', new Date().getTime().toString(), 'count', count],
['expire', key, per]
]).exec(callback);
if (count == 1)
_this.redis.pipeline([
['hmset', key, 'timestamp', new Date().getTime().toString(), 'count', count],
['expire', key, per]
]).exec(callback);
else
_this.redis.hmset(key, {timestamp: new Date().getTime().toString(), count: count}, callback);
};
};
var limit = _this.task.options.throttle.limit;

@@ -64,3 +67,2 @@ var per = _this.task.options.throttle.per;

if (limit > 0 && per) {

@@ -72,3 +74,3 @@

_this.redis.del(_this.key('queue'), function (err) {
_this.lane.queueObject.enqueueIn(perMs + (Math.floor(Math.random() * perMs) + 1000),
_this.lane.queueObject.enqueueIn((perMs / 2) + (Math.floor(Math.random() * perMs) + 1000),
_this.task.options.priority, 'HiveRunner', _this.task, function () {

@@ -75,0 +77,0 @@ next(null, false);

@@ -95,3 +95,2 @@ /**

}

@@ -98,0 +97,0 @@ }

@@ -91,6 +91,4 @@ /**

_this.on('success', function (worker, priority, job, result) {
//console.log('Worker: finished a', priority, 'priority job.', {
// worker: worker,
// name: {class: job.class, priority: job.queue}
//});
if (process.env.NODE_ENV && process.env.NODE_ENV == 'development')
console.log(new Date() + ': Task "' + job.args[0].name + '" completed!');
});

@@ -97,0 +95,0 @@

{
"name": "hive-dev",
"version": "1.0.12",
"version": "1.0.13",
"description": "An intelligent Redis powered, job, worker and queue library with advanced options and plugin support.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,2 +16,3 @@ # Hive

- Unique locking of queue items based on all task data. [DONE]
- Repeatable Tasks [DONE]
- Priority queues with scaleable task processesors per priority. [DONE]

@@ -22,2 +23,2 @@ - Clustered by design, works across multiple servers but also just as well on it's own. [DONE]

- API [WIP]
- Plugins [DONE - Just queue pluginss for now]
- Plugins [DONE - Just queue plugins for now]

Sorry, the diff of this file is not supported yet

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