+4
-0
@@ -175,2 +175,6 @@ 'use strict'; | ||
| if (!message) { | ||
| return; | ||
| } | ||
| outstanding++; | ||
@@ -177,0 +181,0 @@ consumer(null, message, function(err) { |
+1
-1
| { | ||
| "name": "dbqueue", | ||
| "version": "3.0.0", | ||
| "version": "3.0.1", | ||
| "description": "A minimal, durable DB-based message queue system", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/elliotf/node-dbqueue", |
+24
-0
@@ -613,2 +613,26 @@ 'use strict'; | ||
| }); | ||
| context('when there are no messages', function() { | ||
| it('does not call the consumer', function(done) { | ||
| var clock = this.sinon.useFakeTimers(); | ||
| var consumer = this.sinon.spy(); | ||
| this.sinon.stub(queue, 'consume', function(queue_name, consume_options, done) { | ||
| return done(); | ||
| }); | ||
| listen_options = { | ||
| max_outstanding: 2, | ||
| lock_time: 3000, | ||
| interval: 100, | ||
| }; | ||
| queue.listen('an empty queue', listen_options, consumer); | ||
| clock.tick(30000); | ||
| expect(consumer).to.have.callCount(0); | ||
| return done(); | ||
| }); | ||
| }); | ||
| }); | ||
@@ -615,0 +639,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
41761
1.71%917
2.34%