Comparing version 4.0.0-rc.1 to 4.0.0-rc.2
@@ -7,5 +7,2 @@ 'use strict'; | ||
const requestAsync = Bluebird.promisify(request); | ||
module.exports = class IronMQ { | ||
@@ -32,5 +29,8 @@ constructor(config) { | ||
.catch(function(error) { | ||
if (error.message === 'Queue not found') | ||
return []; | ||
else | ||
// IronMQ treats an unexisting queue as an error. | ||
// Expose as empty queue instead. | ||
if (error.message === 'Queue not found') { | ||
return Bluebird.delay(wait * 1000) | ||
.then(() => []); | ||
} else | ||
throw error; | ||
@@ -75,3 +75,3 @@ }); | ||
}; | ||
return requestAsync(req) | ||
return Bluebird.promisify(request)(req) | ||
.then(function(res) { | ||
@@ -78,0 +78,0 @@ if (res.statusCode >= 400) |
@@ -329,4 +329,4 @@ 'use strict'; | ||
} else { | ||
debug('%s out of %s jobs running, nothing to do', this._activeJobs, config.concurrency); | ||
return Bluebird.delay(10).then(() => []); | ||
debug('%s out of %s %s jobs running, nothing to do', this._activeJobs, config.concurrency, this.name); | ||
return Bluebird.delay(500).then(() => []); | ||
} | ||
@@ -333,0 +333,0 @@ }) |
{ | ||
"name": "ironium", | ||
"version": "4.0.0-rc.1", | ||
"version": "4.0.0-rc.2", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "lint": "eslint .", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2446
3
117799
41