Comparing version 0.1.5 to 0.1.6
@@ -264,3 +264,3 @@ var $__Object = Object, $__getOwnPropertyNames = $__Object.getOwnPropertyNames, $__getOwnPropertyDescriptor = $__Object.getOwnPropertyDescriptor, $__getDescriptors = function(object) { | ||
this._getSession.request('reserve_with_timeout', 0, (function(error, jobID, payload) { | ||
if (error == 'TIMED_OUT') callback(null, false); else if (error) callback(error); else if (payload) this._processJob(jobID, payload, function(error) { | ||
if (error == 'DEADLINE_SOON' || error == 'TIMED_OUT') callback(null, false); else if (error) callback(error); else if (payload) this._processJob(jobID, payload, function(error) { | ||
callback(error, !error); | ||
@@ -274,3 +274,3 @@ }); else callback(null, false); | ||
this._getSession.request('reserve_with_timeout', RESERVE_TIMEOUT / 1000, (function(error, jobID, payload) { | ||
if (error == 'DEADLINE_SOON') setImmediate(pickNextJob); else if (error) { | ||
if (error == 'DEADLINE_SOON' || error == 'TIMED_OUT') setImmediate(pickNextJob); else if (error) { | ||
this._logger.error(error); | ||
@@ -277,0 +277,0 @@ setTimeout(pickNextJob, ERROR_BACKOFF); |
{ | ||
"name": "ironium", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "test": "./node_modules/.bin/mocha", |
@@ -373,3 +373,3 @@ const _ = require('lodash'); | ||
this._getSession.request('reserve_with_timeout', 0, (error, jobID, payload)=> { | ||
if (error == 'TIMED_OUT') | ||
if (error == 'DEADLINE_SOON' || error == 'TIMED_OUT') | ||
callback(null, false); | ||
@@ -396,3 +396,3 @@ else if (error) | ||
this._getSession.request('reserve_with_timeout', RESERVE_TIMEOUT / 1000, (error, jobID, payload)=> { | ||
if (error == 'DEADLINE_SOON') | ||
if (error == 'DEADLINE_SOON' || error == 'TIMED_OUT') | ||
setImmediate(pickNextJob); | ||
@@ -399,0 +399,0 @@ else if (error) { |
46586