Reverse sort order on processing

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-08-28 16:35:28 -07:00
parent 3c7fef19e0
commit 570b1bc2fb

View File

@ -150,7 +150,7 @@ function scanDir(parent, path) {
}); });
}); });
}, { }, {
concurrency: 10 concurrency: 1
}).then(function() { }).then(function() {
scanning--; scanning--;
if (scanning == 0) { if (scanning == 0) {
@ -281,7 +281,7 @@ function triggerWatcher() {
/* Sort to newest files to be processed first */ /* Sort to newest files to be processed first */
processing.sort(function(a, b) { processing.sort(function(a, b) {
return b[2] - a[2]; return a[2] - b[2];
}); });
return Promise.map(processing, function(entry) { return Promise.map(processing, function(entry) {