Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix sorting as mentioned in #33, #113 and #131

  • Loading branch information...
commit c277809d0ffb8d6d6ac367e0a6858d2cccf42c9e 1 parent 664cdae
@webjay webjay authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/queue/job.js
View
4 lib/queue/job.js
@@ -1,4 +1,3 @@
-
/*!
* kue - Job
* Copyright (c) 2011 LearnBoost <tj@learnboost.com>
@@ -58,6 +57,9 @@ function map(jobs, ids){
ids.forEach(function(id){
if (jobs[id]) ret.push(jobs[id]);
});
+ ret = ret.sort(function (a, b) {
+ return parseInt(a.id) - parseInt(b.id);
+ });
return ret;
}
Please sign in to comment.
Something went wrong with that request. Please try again.