New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

minion-kit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minion-kit - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

27

dist/Queue.js

@@ -253,2 +253,3 @@ 'use strict';

var _ref9 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(consumerChannel, queueName, payload, msg) {
var finalQueueName;
return regeneratorRuntime.wrap(function _callee9$(_context9) {

@@ -266,3 +267,4 @@ while (1) {

attemptsLimit: msg.properties.headers.attemptsLimit,
attemptsCount: msg.properties.headers.attemptsCount + 1
attemptsCount: msg.properties.headers.attemptsCount + 1,
finalQueueOnAttemptsExceeded: msg.properties.headers.finalQueueOnAttemptsExceeded
});

@@ -274,9 +276,28 @@

debug('[' + payload.correlationId + '] Requeued job');
_context9.next = 8;
_context9.next = 16;
break;
case 7:
if (!msg.properties.headers.finalQueueOnAttemptsExceeded) {
_context9.next = 15;
break;
}
finalQueueName = msg.properties.headers.finalQueueOnAttemptsExceeded;
_context9.next = 11;
return _this.sendToQueue(finalQueueName, payload, {
attemptsCount: msg.properties.headers.attemptsCount
});
case 11:
consumerChannel.nack(msg, false, false);
debug('[' + payload.correlationId + '] Sent job to final queue');
_context9.next = 16;
break;
case 8:
case 15:
consumerChannel.nack(msg, false, false);
case 16:
case 'end':

@@ -283,0 +304,0 @@ return _context9.stop();

@@ -123,3 +123,4 @@

attemptsLimit: msg.properties.headers.attemptsLimit,
attemptsCount: msg.properties.headers.attemptsCount + 1
attemptsCount: msg.properties.headers.attemptsCount + 1,
finalQueueOnAttemptsExceeded: msg.properties.headers.finalQueueOnAttemptsExceeded
})

@@ -131,3 +132,15 @@

else {
consumerChannel.nack(msg, false, false);
if (msg.properties.headers.finalQueueOnAttemptsExceeded) {
const finalQueueName = msg.properties.headers.finalQueueOnAttemptsExceeded
await this.sendToQueue(finalQueueName, payload, {
attemptsCount: msg.properties.headers.attemptsCount,
})
consumerChannel.nack(msg, false, false);
debug(`[${payload.correlationId}] Sent job to final queue`);
}
else {
consumerChannel.nack(msg, false, false);
}
}

@@ -134,0 +147,0 @@ }

2

package.json
{
"name": "minion-kit",
"version": "0.2.0",
"version": "0.3.0",
"description": "Toolkit for building tiny workers in a microservice environment using an event bus",

@@ -5,0 +5,0 @@ "main": "dist/",

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