Skip to content

Commit

Permalink
fix sorting as mentioned in #33, #113 and #131
Browse files Browse the repository at this point in the history
  • Loading branch information
webjay committed Feb 6, 2013
1 parent 664cdae commit c277809
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/queue/job.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*!
* kue - Job
* Copyright (c) 2011 LearnBoost <tj@learnboost.com>
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c277809

Please sign in to comment.