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

better-queue

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-queue - npm Package Compare versions

Comparing version 3.5.0 to 3.5.1

10

lib/queue.js

@@ -308,7 +308,9 @@ var uuid = require('node-uuid');

// Task is in the queue -- update stats
self.length++;
if (self._queuedPeak < self.length) {
self._queuedPeak = self.length;
if (isNew) {
self.length++;
if (self._queuedPeak < self.length) {
self._queuedPeak = self.length;
}
self._queuedTime[taskId] = new Date().getTime();
}
self._queuedTime[taskId] = new Date().getTime();

@@ -315,0 +317,0 @@ // Notify the ticket

2

package.json
{
"name": "better-queue",
"version": "3.5.0",
"version": "3.5.1",
"description": "Better Queue for NodeJS",

@@ -5,0 +5,0 @@ "main": "lib/queue.js",

@@ -401,2 +401,20 @@ var assert = require('assert');

it('should merge but not batch until the delay has happened', function (done) {
var running = false;
var q = new Queue(function (arr) {
running = true;
}, {
batchSize: 2,
batchDelay: Infinity,
id: 'id'
})
setTimeout(function () {
q.push({ id: 'a', x: 1 });
q.push({ id: 'a', x: 2 });
}, 1)
setTimeout(function () {
assert.ok(!running);
done();
}, 10)
})
})
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