summaryrefslogtreecommitdiff
path: root/lib/worker/processTasks.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/worker/processTasks.js')
-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!')