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

ironium

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ironium - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

11

lib/queues.js

@@ -38,2 +38,3 @@ var $__Object = Object, $__getOwnPropertyNames = $__Object.getOwnPropertyNames, $__getOwnPropertyDescriptor = $__Object.getOwnPropertyDescriptor, $__getDescriptors = function(object) {

var RELEASE_DELAY = ms('1m');
var ERROR_BACKOFF = ms('30s');
module.exports = (function() {

@@ -136,3 +137,3 @@ 'use strict';

var timeout = setTimeout((function() {
oncomplete(new Error('TIMED_OUT'));
oncomplete('TIMED_OUT');
}), TIMEOUT_REQUEST);

@@ -155,3 +156,3 @@ this._withClient(function(client) {

var oncomplete;
while (oncomplete = pending.shift()) oncomplete(new Error('TIMED_OUT'));
while (oncomplete = pending.shift()) oncomplete('TIMED_OUT');
}));

@@ -266,5 +267,5 @@ },

this._getSession.request('reserve_with_timeout', 0, (function(error, jobID, payload) {
if (error == 'TIMED_OUT') callback(null, false); else if (error) callback(error); else this._processJob(jobID, payload, function(error) {
if (error == 'TIMED_OUT') callback(null, false); else if (error) callback(error); else if (payload) this._processJob(jobID, payload, function(error) {
callback(error, !error);
});
}); else callback(null, false);
}).bind(this));

@@ -278,3 +279,3 @@ },

this._logger.error(error);
setImmediate(pickNextJob);
setTimeout(pickNextJob, ERROR_BACKOFF);
} else this._processContinously(jobID, payload, pickNextJob);

@@ -281,0 +282,0 @@ }).bind(this));

{
"name": "ironium",
"version": "0.1.2",
"version": "0.1.3",
"scripts": {

@@ -5,0 +5,0 @@ "test": "./node_modules/.bin/mocha",

@@ -26,4 +26,8 @@ const _ = require('lodash');

// Back-off in case of connection error, prevents continously failing to
// reserve a job.
const ERROR_BACKOFF = ms('30s');
// Abstracts an Iron.io project / Beanstalkd configuration.

@@ -184,3 +188,3 @@ //

let timeout = setTimeout(()=> {
oncomplete(new Error('TIMED_OUT'));
oncomplete('TIMED_OUT');
}, TIMEOUT_REQUEST);

@@ -211,3 +215,3 @@ // Get Fivebeans to execute this command.

while (oncomplete = pending.shift())
oncomplete(new Error('TIMED_OUT'));
oncomplete('TIMED_OUT');
});

@@ -376,6 +380,8 @@ }

callback(error);
else
else if (payload)
this._processJob(jobID, payload, function(error) {
callback(error, !error);
});
else
callback(null, false);
});

@@ -397,3 +403,3 @@ }

this._logger.error(error)
setImmediate(pickNextJob);
setTimeout(pickNextJob, ERROR_BACKOFF);
} else

@@ -400,0 +406,0 @@ this._processContinously(jobID, payload, pickNextJob);

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