summaryrefslogtreecommitdiff
path: root/lib/worker
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-07-21 05:31:27 +0200
committerJules Laplace <julescarbon@gmail.com>2017-07-21 05:31:27 +0200
commit007059ed2483009043b5569e4d95049139878798 (patch)
tree484398ccda5174b6af55a8ca75510e6e69b4bb1f /lib/worker
parent55b2b2c464064393f8ce7bd2245bdd89bbffbeec (diff)
html..
Diffstat (limited to 'lib/worker')
-rw-r--r--lib/worker/processTasks.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/worker/processTasks.js b/lib/worker/processTasks.js
index c60aaf5..7eeaa98 100644
--- a/lib/worker/processTasks.js
+++ b/lib/worker/processTasks.js
@@ -14,7 +14,7 @@ module.exports = function processTasks() {
processing = true
console.log('fetching tasks...')
- db.models.task.index({ completed: false, limit: 1 }).then( (tasks) => {
+ db.models.task.index({ completed: false, limit: 1, orderBy: 'id asc', }).then( (tasks) => {
// console.log(tasks.length + ' tasks left to process')
if (! tasks || tasks.length === 0) {
console.log('> completed all tasks!')