Socket
Socket
Sign inDemoInstall

kue

Package Overview
Dependencies
133
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.4 to 0.10.5

.idea/watcherTasks.xml

31

lib/queue/job.js

@@ -191,4 +191,4 @@ /*!

job._progress = hash.progress;
job._attempts = hash.attempts;
job._max_attempts = hash.max_attempts;
job._attempts = Number(hash.attempts);
job._max_attempts = Number(hash.max_attempts);
job._state = hash.state;

@@ -527,16 +527,15 @@ job._error = hash.error;

Job.prototype.attempt = function( fn ) {
var self = this
, client = this.client
var client = this.client
, id = this.id
, key = client.getKey('job:' + id);
//TODO this now can be removed, since max_attempts is set in the constructor
client.hsetnx(key, 'max_attempts', 1, function() {
client.hget(key, 'max_attempts', function( err, max ) {
client.hincrby(key, 'attempts', 1, function( err, attempts ) {
fn(err, Math.max(0, max - attempts), attempts, max);
});
});
});
this._attempts = this._attempts || 0;
if( this._attempts < this._max_attempts ) {
client.hincrby(key, 'attempts', 1, function( err, attempts ) {
this._attempts = attempts;
fn(err, Math.max(0, this._max_attempts - attempts), attempts, this._max_attempts);
}.bind(this));
} else {
fn(null, 0, this._attempts, this._max_attempts);
}
return this;

@@ -597,3 +596,3 @@ };

}
if( remaining ) {
if( remaining > 0 ) {
this.reattempt(attempts, function( err ) {

@@ -606,4 +605,6 @@ if( err ) {

}.bind(this));
} else if( remaining === 0 ) {
fn && fn( null, false, attempts );
} else {
fn && fn( null, false, attempts );
fn && fn( new Error('Attempts Exceeded') );
}

@@ -610,0 +611,0 @@ }.bind(this));

{
"name": "kue",
"version": "0.10.4",
"version": "0.10.5",
"description": "Feature rich priority job queue backed by redis",
"homepage": "http://learnboost.github.com/kue/",
"homepage": "http://automattic.github.io/kue/",
"keywords": [

@@ -22,6 +22,6 @@ "job",

"type": "git",
"url": "https://github.com/LearnBoost/kue.git"
"url": "https://github.com/Automattic/kue.git"
},
"bugs": {
"url": "https://github.com/LearnBoost/kue/issues"
"url": "https://github.com/Automattic/kue/issues"
},

@@ -36,3 +36,3 @@ "dependencies": {

"node-redis-warlock": "^0.1.2",
"redis": "^2.3.0",
"redis": "^2.4.2",
"reds": "~0.2.5",

@@ -47,2 +47,3 @@ "stylus": "~0.52.4"

"should": "^3.1.0",
"sinon": "^1.17.2",
"supertest": "~1.1.0"

@@ -49,0 +50,0 @@ },

@@ -334,3 +334,3 @@ # Kue

For a "real" example, let's say we need to compile a PDF from numerous slides with [node-canvas](http://github.com/learnboost/node-canvas). Our job may consist of the following data, note that in general you should _not_ store large data in the job it-self, it's better to store references like ids, pulling them in while processing.
For a "real" example, let's say we need to compile a PDF from numerous slides with [node-canvas](https://github.com/Automattic/node-canvas). Our job may consist of the following data, note that in general you should _not_ store large data in the job it-self, it's better to store references like ids, pulling them in while processing.

@@ -415,3 +415,3 @@ ```js

This is the softest and best solution, however is not built-in with Kue. Please refer to [this discussion](https://github.com/kriskowal/q/issues/120). You can comment on this feature in the related open Kue [issue](https://github.com/LearnBoost/kue/pull/403).
This is the softest and best solution, however is not built-in with Kue. Please refer to [this discussion](https://github.com/kriskowal/q/issues/120). You can comment on this feature in the related open Kue [issue](https://github.com/Automattic/kue/pull/403).

@@ -454,3 +454,3 @@ You can also use promises to do something like

Kue will be refactored to fully atomic job state management from version 1.0 and this will happen by lua scripts and/or BRPOPLPUSH combination. You can read more [here](https://github.com/LearnBoost/kue/issues/130) and [here](https://github.com/LearnBoost/kue/issues/38).
Kue will be refactored to fully atomic job state management from version 1.0 and this will happen by lua scripts and/or BRPOPLPUSH combination. You can read more [here](https://github.com/Automattic/kue/issues/130) and [here](https://github.com/Automattic/kue/issues/38).

@@ -645,3 +645,3 @@ ## Queue Maintenance

The UI is a small [Express](http://github.com/visionmedia/express) application.
The UI is a small [Express](https://github.com/strongloop/express) application.
A script is provided in `bin/` for running the interface as a standalone application

@@ -700,3 +700,3 @@ with default settings. You may pass in options for the port and redis-url. For example:

Search feature is turned off by default from Kue `>=0.9.0`. Read more about this [here](https://github.com/LearnBoost/kue/issues/412). You should enable search indexes in you need to:
Search feature is turned off by default from Kue `>=0.9.0`. Read more about this [here](https://github.com/Automattic/kue/issues/412). You should enable search indexes in you need to:

@@ -902,3 +902,3 @@ ```javascript

- [Introduction](http://www.screenr.com/oyNs) to Kue
- API [walkthrough](http://vimeo.com/26963384) to Kue
- API [walkthrough](https://vimeo.com/26963384) to Kue

@@ -905,0 +905,0 @@ ## License

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc